Re: RES: TP-LINK USB no carrier after speed test

From: Hans Petter Selasky <hps_at_selasky.org>
Date: Tue, 27 Sep 2022 07:19:00 UTC
On 9/27/22 02:24, Alexander Motin wrote:
> On 26.09.2022 17:29, Hans Petter Selasky wrote:
>> I've got a supposedly "broken" if_ure dongle from Alexander, but I'm 
>> unable to reproduce the if_ure hang on two different pieces of XHCI 
>> hardware, Intel based and AMD based, which I've got.
>>
>> This leads me to believe there is a bug in the XHCI driver or hardware 
>> on your system.
>>
>> Can you share the pciconfig -lv output for your XHCI controllers?
> 
> I have two laptops of different generations reproducing this problem, 
> but both are having Thunderbolt on the USB-C ports:
> 
> This is one (7th Gen Core i7):
> 
> xhci1@pci0:56:0:0:      class=0x0c0330 rev=0x02 hdr=0x00 vendor=0x8086 
> device=0x15d4 subvendor=0x2222 subdevice=0x1111
>      vendor     = 'Intel Corporation'
>      device     = 'JHL6540 Thunderbolt 3 USB Controller (C step) [Alpine 
> Ridge 4C 2016]'
>      class      = serial bus
>      subclass   = USB
>      bar   [10] = type Memory, range 32, base 0xc3f00000, size 65536, 
> enabled
>      cap 01[80] = powerspec 3  supports D0 D1 D2 D3  current D0
>      cap 05[88] = MSI supports 8 messages, 64 bit enabled with 1 message
>      cap 10[c0] = PCI-Express 2 endpoint max data 128(128) RO NS
>                   max read 512
>                   link x4(x4) speed 2.5(2.5) ASPM disabled(L0s/L1) 
> ClockPM disabled
>      ecap 0003[100] = Serial 1 20ff910876f10c00
>      ecap 0001[200] = AER 1 0 fatal 0 non-fatal 1 corrected
>      ecap 0002[300] = VC 1 max VC0
>      ecap 0004[400] = Power Budgeting 1
>      ecap 000b[500] = Vendor [1] ID 1234 Rev 1 Length 216
>      ecap 0018[600] = LTR 1
>      ecap 0019[700] = PCIe Sec 1 lane errors 0
> 
> This is another (11th Gen Core i7);
> 
> xhci0@pci0:0:13:0:      class=0x0c0330 rev=0x01 hdr=0x00 vendor=0x8086 
> device=0x9a13 subvendor=0x1028 subdevice=0x0991
>      vendor     = 'Intel Corporation'
>      device     = 'Tiger Lake-LP Thunderbolt 4 USB Controller'
>      class      = serial bus
>      subclass   = USB
>      bar   [10] = type Memory, range 64, base 0x60552c0000, size 65536, 
> enabled
>      cap 01[70] = powerspec 2  supports D0 D3  current D0
>      cap 05[80] = MSI supports 8 messages, 64 bit enabled with 1 message
>      cap 09[90] = vendor (length 20) Intel cap 15 version 0
>      cap 09[b0] = vendor (length 0) Intel cap 0 version 1
> 
> Does the system you also has Thunderbolt chip, or you use native Intel 
> chipet's XHCI?
> 
>> Also, when running the stress test and you see the traffic stops, what 
>> happens if you run this command as root on the ugen which the if_ure 
>> belongs to:
>>
>> usbconfig -d ugenX.Y dump_string 0
>>
>> Does the traffic resume?
> 
> Nope. Out of 4 times when traffic stopped 2 times it reported <read 
> error> and 2 times it completed successfully, but it neither case it 
> recovered traffic.  Only reset recovered it.
> 

Hi Alexander,

Could you run "usbdump -d X.Y" at the same time to capture all the errors?

Looking especially for USB_ERR_TIMEOUT .

I have this:

xhci0@pci0:3:0:3:	class=0x0c0330 rev=0x00 hdr=0x00 vendor=0x1022 
device=0x15e0 subvendor=0x1849 subdevice=0xffff
     vendor     = 'Advanced Micro Devices, Inc. [AMD]'
     device     = 'Raven USB 3.1'
     class      = serial bus
     subclass   = USB

xhci0@pci0:0:20:0:	class=0x0c0330 rev=0x21 hdr=0x00 vendor=0x8086 
device=0x9d2f subvendor=0x8086 subdevice=0x9d2f
     vendor     = 'Intel Corporation'
     device     = 'Sunrise Point-LP USB 3.0 xHCI Controller'
     class      = serial bus
     subclass   = USB

--HPS