Bug 202541

Summary: xhci_hcd 0000:15:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state
Product: Drivers Reporter: Bernhard (bernhard.gebetsberger)
Component: USBAssignee: Greg Kroah-Hartman (greg)
Status: NEW ---    
Severity: high CC: antdev66, b.cortooms, biopsin, bst, christian.rohmann, danny.j.smith, dion, doug16k, dront78, ehoffman, erickperez, eugene, fgrim, gandalf, github, grsfdhj, himanshu.xt, jacobbrett+kernel.org, james, jernej.jakob, jim, k.j.vanmierlo, koparebu, kronenpj, lists, luke-jr+linuxbugs, martijn, mathias.nyman, matt, mgs.kernel, mlkcampion, nrndda, oyvind, pupilla, qbarnes, R.E.Wolff, raulvior.bcn, S.Braendlin, sandro.stross, sapier, shyam-sundar.s-k, ske5074, stf_xl, stuart.alan.small, stulluk, svmohr, t.clastres, tisaak, tsebrenko, viniciuspython, wgh, ZeroBeat
Priority: P1    
Hardware: x86-64   
OS: Linux   
Kernel Version: >= 4.20 Subsystem:
Regression: Yes Bisected commit-id:
Attachments: dmesg output before reboot
dmesg output after reboot
rt2x00_revert_4.20_changes.patch
Patch adding doorbell tracing
Dmesg log and trace file
Logs after flushing endpoint
Patch handling halted endpoints at completion of stop endpoint command
Logs after applying the patch
Logs after applying the patch
Patch v2 1/2 handling halted endpoints at completion of stop endpoint command
Patch v2 2/2 handling halted endpoints at completion of stop endpoint command
Patch from Nyman's rewrite_halt_stop_handling branch
rt2800usb_no_soft_retry.patch
rt2800usb_no_soft_retry_v2.patch
0001-usb-xhci-do-not-perform-Soft-Retry-for-some-xHCI-hos.patch
asmedia_subsytem_quirks.patch
Dmesg of a Toshiba USB 3.0 HDD connected to USB 3.0 front port and back port.
Dmesg of a OnePlus 7 Pro connecting in USB 3.1 gen1 mode. No errors.
xhci no soft retry for Intel xhci 8086:06ed and 8086:31a8

Description Bernhard 2019-02-09 16:41:04 UTC
After upgrading to the 4.20 Kernel(was using 4.19 previously) my usb wifi stick doesn´t work until I reboot the system. This issue happens every time I start my pc(only when the system was shut down, it doesn´t happen after rebooting). The wifi driver in use is rt2800usb. I tried restarting the NetworkManager, but this didn´t change anything.
Comment 1 Stanislaw Gruszka 2019-03-10 10:39:39 UTC
Hmm, that's strange perhaps this is some USB host problem. Please provide dmesg of your system.
Comment 2 Bernhard 2019-03-10 11:51:19 UTC
Created attachment 281677 [details]
dmesg output before reboot
Comment 3 Bernhard 2019-03-10 11:51:46 UTC
Created attachment 281679 [details]
dmesg output after reboot
Comment 4 Stanislaw Gruszka 2019-03-10 13:59:34 UTC
We have this xhci_hcd warning on bad case:

 xhci_hcd 0000:15:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state

Not sure where it come from. But I notice you are using AMD IOMMU which we have troubles with with different drivers. 

You could try to disable iommu via kerenl boot parameter and check if that improve things. You could also try test this patch if possible:
https://bugzilla.kernel.org/attachment.cgi?id=281675

If none of that helps I will prepare some rt2800 patches to see if this not caused by some of v4.19 .. v4.20 rt2800 commits:

0240564430c0 rt2800: flush and txstatus rework for rt2800mmio
adf26a356f13 rt2x00: use different txstatus timeouts when flushing
5022efb50f62 rt2x00: do not check for txstatus timeout every time on tasklet
0b0d556e0ebb rt2800mmio: use txdone/txstatus routines from lib
5c656c71b1bf rt2800: move usb specific txdone/txstatus routines to rt2800lib
f483039cf51a rt2x00: use simple_read_from_buffer()

But I would rather suspect problem introduced in AMD IOMMU or usb/xhci drivers.
Comment 5 Bernhard 2019-03-10 22:32:28 UTC
I tried disabling iommu, and I also compiled the 4.20.15 kernel from source with that patch applied, but the wifi didn´t work in both cases either.
Comment 6 Stanislaw Gruszka 2019-03-11 14:18:25 UTC
Created attachment 281711 [details]
rt2x00_revert_4.20_changes.patch

Please test this patch and report if it makes problem gone or not.
Comment 7 Bernhard 2019-03-11 14:51:47 UTC
The problem is still there after applying that patch.
Comment 8 Stanislaw Gruszka 2019-03-11 15:22:06 UTC
You need to report this bug usb maintainers. I'm changing the topic and component, but USB bugs should be reported directly to mailing list.
Comment 9 Stanislaw Gruszka 2019-03-11 15:22:50 UTC
Please send bug report to  linux-usb@vger.kernel.org
Comment 10 Michael 2019-04-05 19:46:31 UTC
I can confirm this issue. Also I can confirm that other USB devices are effected, too (mostly if plugged into an USB3 port).
For example:
ID 7392:7710 Edimax Technology Co., Ltd (mt7601u)
WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.

dmesg doesn't show IOMMU warnings, so I assume it is a problem introduced in usb/xhci driver.
Comment 11 Bernhard 2019-04-06 02:00:56 UTC
(In reply to Michael from comment #10)
> I can confirm this issue. Also I can confirm that other USB devices are
> effected, too (mostly if plugged into an USB3 port).
> For example:
> ID 7392:7710 Edimax Technology Co., Ltd (mt7601u)
> WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
> 
> dmesg doesn't show IOMMU warnings, so I assume it is a problem introduced in
> usb/xhci driver.

I think this affects only a specific hardware configuration(I've tried using my wifi stick on a different machine and it worked without problems).
Which hardware are you using? Maybe there are some parts we have in common.

My hardware configuration:
CPU: AMD Ryzen 3 2200G, Motherboard: MSI B350 PC MATE
GPU: AMD Radeon RX 580 8GB
Comment 12 Michael 2019-04-06 07:40:43 UTC
@ Bernhard
The parts we have in common : AMD RYZEN

AMD RYZEN 1700 MSI X370 KRAIT, MSI AERO GTX1080Ti, 5.0.6-arch1-1-ARCH (system was also affected by IOMMU issue - but that is fixed)

Affected USB WiFi devices (tested):
ID 148f:3070 Ralink Technology, Corp. RT2870/RT3070 Wireless Adapter (ALFA AWUS036NH - rt2800usb)
ID 148f:3070 Ralink Technology, Corp. RT2870/RT3070 Wireless Adapter (ipTime/ zioncom  - rt2800usb)
ID 7392:7710 Edimax Technology Co., Ltd (mt7601u)
ID 7392:a812 Edimax Technology Co., Ltd (Edimax EW-7811USC - rtl88xxau)
ID 148f:761a Ralink Technology, Corp. MT7610U ("Archer T2U" 2.4G+5G WLAN Adapter  - mt76x0)
ID 0b05:17d1 ASUSTek Computer, Inc. AC51 802.11a/b/g/n/ac Wireless Adapter [Mediatek MT7610U] 
ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)
I'm sure there are more.

After he has fixed some driver / IOMMU issues, Stanislaw has found out, that it possibly could be a xhci/driver issue. I share his opinion.

You can read more about the issues here:
https://github.com/ZerBea/hcxdumptool/issues/42
and the fixed IOMMU issue here:
https://bugzilla.kernel.org/show_bug.cgi?id=202241
Comment 13 Stanislaw Gruszka 2019-04-06 08:47:54 UTC
FTR: I think those two commits could help:

commit 6cbcf596934c8e16d6288c7cc62dfb7ad8eadf15
Author: Mathias Nyman <mathias.nyman@linux.intel.com>
Date:   Fri Mar 22 17:50:15 2019 +0200

    xhci: Fix port resume done detection for SS ports with LPM enabled

commit d92f2c59cc2cbca6bfb2cc54882b58ba76b15fd4
Author: Mathias Nyman <mathias.nyman@linux.intel.com>
Date:   Fri Mar 22 17:50:17 2019 +0200

    xhci: Don't let USB3 ports stuck in polling state prevent suspend

Also I'm not sure if if issue was reported to proper maintainer. If not and problem is not already fixed on latest upstream, either bisection will be needed to precede with this bug or fill properly informative bug report to proper maintainer.
Comment 14 Michael 2019-04-06 09:27:40 UTC
@ Stanislaw, thanks for additional information.

@ Bernhard, ‎have you already sent this bug report to linux-usb mailing list?

can we change affected kernel version from 4.20 to >= 4.20, because 5.0.6 is affected, too?
Comment 15 Bernhard 2019-04-06 10:15:17 UTC
Yes, I already sent this to the mailing list, but I got no response unfortunately.

I've changed the affected kernel version btw.
Comment 16 Michael 2019-04-06 10:28:05 UTC
@ Bernhard, thanks for your answer. So there is no need for me to report this issue, too.
Comment 17 Bernhard 2019-04-06 11:31:23 UTC
I just tried the two patches Stanislaw mentioned, but the problem is still there.
Comment 18 Michael 2019-04-06 11:57:00 UTC
Tried them, too, some days ago, but the didn't solve the issue.
Just downloaded 5.1rc3, but I don't expect a working driver (usb/host), inside.
Comment 19 Michael 2019-04-06 22:36:40 UTC
Tested an ASUS X555U (Intel i5-6200 - 5.0.6-arch1-1-ARCH) and that system is affected, if the device is plugged into one of the USB3 ports. The device is working, if plugged into the USB2 port.
Comment 20 Bernhard 2019-04-07 01:15:44 UTC
I just tried replacing the xhci_ring.c file with the version from the 4.19 kernel, that solved the problem. Then I started patching the code until the problem occurs again. 
The change in the function "static int process_bulk_intr_td" is causing the problem, it's part of this patch: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/diff/drivers/usb/host/xhci-ring.c?id=9703fc8caf36ac65dca1538b23dd137de0b53233
Comment 21 Stanislaw Gruszka 2019-04-07 08:17:17 UTC
Berna(In reply to Bernhard from comment #20)
> I just tried replacing the xhci_ring.c file with the version from the 4.19
> kernel, that solved the problem. Then I started patching the code until the
> problem occurs again. 
> The change in the function "static int process_bulk_intr_td" is causing the
> problem, it's part of this patch:
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/diff/
> drivers/usb/host/xhci-ring.c?id=9703fc8caf36ac65dca1538b23dd137de0b53233

Good findings, great. This seems to be part of 

commit f8f80be501aa2f10669585c3e328fad079d8cb3a
Author: Mathias Nyman <mathias.nyman@linux.intel.com>
Date:   Thu Sep 20 19:13:37 2018 +0300

    xhci: Use soft retry to recover faster from transaction errors

Just add information you found in the posted linux-usb email and CC "Mathias Nyman <mathias.nyman@linux.intel.com>" to make sure he is aware of the problem.
Comment 22 Michael 2019-04-07 09:08:51 UTC
The issue isn't fixed in 5.1rc3, so it look's like Mathias Nyman isn't aware of the problem, yet.
Comment 23 Michael 2019-05-20 08:04:25 UTC
Still present in 5.1.2
Comment 24 Michael 2019-06-08 19:24:48 UTC
This issue is really funny:
running
D 0b05:17d1 ASUSTek Computer, Inc. AC51 802.11a/b/g/n/ac Wireless Adapter [Mediatek MT7610U]

on kernel
$ uname -r
5.1.7-arch1-1-ARCH

will spam the log after the know WARN
43163.034783] mt76x0u 1-10.2:1.0 wlp3s0f0u10u2: renamed from wlan0
[43163.351656] usb 1-10.2: USB disconnect, device number 6
[43163.352176] xhci_hcd 0000:03:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.

with tons of failed vendor requests:
[43160.683383] mt76x0u 1-10.2:1.0: vendor request req:06 off:c3dc failed:-71
[43160.813398] mt76x0u 1-10.2:1.0: vendor request req:06 off:c3e0 failed:-71
[43160.943415] mt76x0u 1-10.2:1.0: vendor request req:06 off:c3e4 failed:-71
[43161.073440] mt76x0u 1-10.2:1.0: vendor request req:06 off:c3e8 failed:-71
[43161.203439] mt76x0u 1-10.2:1.0: vendor request req:06 off:c3ec failed:-71
[43161.333458] mt76x0u 1-10.2:1.0: vendor request req:06 off:c3f0 failed:-71
[43161.463468] mt76x0u 1-10.2:1.0: vendor request req:06 off:c3f4 failed:-71
[43161.593561] mt76x0u 1-10.2:1.0: vendor request req:06 off:c3f8 failed:-71
[43161.723502] mt76x0u 1-10.2:1.0: vendor request req:06 off:c3fc failed:-71
[43161.853512] mt76x0u 1-10.2:1.0: vendor request req:06 off:108c failed:-71
....
Comment 25 Michael 2019-06-09 17:59:30 UTC
If the same device is connected to an Intel Core I5-6200 system (USB3 port), the log looks different to the AMD RYZEN system.

[  204.231872] mt76x0u 1-1:1.0: rx urb failed: -71
[  204.231901] mt76x0u 1-1:1.0: rx urb failed: -71
[  204.231940] mt76x0u 1-1:1.0: rx urb failed: -71
[  204.231980] mt76x0u 1-1:1.0: rx urb failed: -71
[  204.232020] mt76x0u 1-1:1.0: rx urb failed: -71
[  204.232188] mt76x0u 1-1:1.0: rx urb failed: -71
[  204.232226] mt76x0u 1-1:1.0: rx urb failed: -71
[  204.232275] mt76x0u 1-1:1.0: rx urb failed: -71
[  204.232304] mt76x0u 1-1:1.0: rx urb failed: -71
[  204.232345] mt76x0u 1-1:1.0: rx urb failed: -71
[  204.233284] xhci_hcd 0000:00:14.0: WARN Cannot submit Set TR Deq Ptr
[  204.233291] xhci_hcd 0000:00:14.0: A Set TR Deq Ptr command is pending.
[  204.263427] mt76x0u 1-1:1.0: TX DMA did not stop
[  207.596726] mt76x0u 1-1:1.0: Warning: MAC TX did not stop!
[  209.650050] mt76x0u 1-1:1.0: Warning: MAC RX did not stop!
[  209.651133] mt76x0u 1-1:1.0: RX DMA did not stop

Also I noticed some changes in xhci-ring.c between 5.1.7 and 5.2_rc4. Maybe they'll fix the problem. I didn't tested it, yet.
Comment 26 Bernhard 2019-06-09 18:12:43 UTC
I already tried the 5.2-rc3 kernel and the problem isn't fixed yet. There were no changes in the xhci driver between rc3 and rc4, so it's very unlikely that the problem doesn't occur in the 5.2-rc4 kernel.
Comment 27 Michael 2019-06-09 18:23:33 UTC
Thanks for the information. I skipped 5.2rc1 ... rc3.

But with your information, there is no real need for me to run some more tests.

Unfortunately it looks like the issue is back ported to older kernel versions (4.19), because I got some issue reports here, too:
https://github.com/ZerBea/hcxdumptool/issues/57

and 90% of my devices doesn't work any longer.
Comment 28 Bernhard 2019-06-09 18:41:16 UTC
When did it get back ported? I'm on 4.19.48 and haven't had a problem with this version...
Comment 29 Michael 2019-06-09 19:46:43 UTC
It's just a guess, because of this post:
https://github.com/ZerBea/hcxdumptool/issues/57#issuecomment-483964293

But it looks like the device was working before that post. 
I cant test it, because I have not such a device.

I tested a TP-LINK Archer T2UH and this device is not working on 4.19.46 arm (Raspberry Pi).
Comment 30 Michael 2019-06-09 19:48:54 UTC
Yes, rt2800usb is working fine on 4.19.46.
Comment 31 Michael 2019-06-10 07:44:05 UTC
hcxdumptool running on kernel 4.19.46 arm doesn't receive packets on several different devices. In this case:
ID 0b05:17d1 ASUSTek Computer, Inc. AC51 802.11a/b/g/n/ac Wireless Adapter [Mediatek MT7610U]
INFO: cha=1, rx=0, rx(dropped)=0, tx=18, err=0, aps=0 (0 in range)

while a few other devices still working
INFO: cha=1, rx=805, rx(dropped)=0, tx=93, err=0, aps=29 (21 in range)

BTW:
I'm running/testing only devices on which driver support monitor mode and packet injection.

Very interesting on that arm kernel is that dmesg doesn't show any WARNs.
Comment 32 Michael 2019-06-20 16:07:12 UTC
Still no fix?
$ uname -r
5.1.11-arch1-1-ARCH

and most of the USB devices WiFI, BLUETOOTH,....) are still not working:
32942.700591] usb 1-10.4: new full-speed USB device number 7 using xhci_hcd
[32944.721410] usb 1-10.4: New USB device found, idVendor=0a12, idProduct=0001, bcdDevice=52.76
[32944.721412] usb 1-10.4: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[32945.069015] Bluetooth: hci0: hardware error 0x37

How about kernel 5.2?
Comment 33 Michael 2019-06-21 07:32:33 UTC
Some USB card readers are also affected (connected to USB 3 port):

$ uname -r
5.1.12-arch1-1-ARCH

[ 3510.100114] usb 2-2: new SuperSpeed Gen 1 USB device number 2 using xhci_hcd
[ 3510.134121] usb 2-2: New USB device found, idVendor=058f, idProduct=6387, bcdDevice= 0.02
[ 3510.134126] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 3510.134128] usb 2-2: Product: Intenso Ultra Line  
[ 3510.134130] usb 2-2: Manufacturer: ALCOR          
...
[ 5129.997608] usb 1-1: reset high-speed USB device number 7 using xhci_hcd
[ 5130.218618] sd 9:0:0:0: [sdb] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[ 5130.218631] sd 9:0:0:0: [sdb] tag#0 CDB: Read(10) 28 00 00 20 c3 c0 00 00 20 00
[ 5130.218637] print_req_error: I/O error, dev sdb, sector 2147264 flags 80700

I really wonder why that issue hasn't been fixed, yet, because many, many devices are affected.
Comment 34 Bernhard 2019-06-21 13:57:28 UTC
The list of changes for 5.2-rc6 contains this two commits:

Mathias Nyman (2):
      usb: xhci: Don't try to recover an endpoint if port is in error state.
      xhci: detect USB 3.2 capable host controllers correctly

I think this could be the fix for this issue.
Comment 35 Michael 2019-06-21 14:40:50 UTC
Great, thanks for the information. The issue is really ugly, because many USB devices are affected (hdd, card reader, bleutooth, wlan, ... - this list is long)
I'll check 5.2-rc6.
Comment 36 Bernhard 2019-06-24 00:53:47 UTC
Just tried 5.2-rc6, but unfortunately I still have the same issue.
Comment 37 Michael 2019-06-24 06:27:32 UTC
Thanks for the information. I tested 5.2-rc6, too. Even an USB 3.0 HDD isn't working.
Comment 38 Michael 2019-07-11 08:32:59 UTC
Now running mainline kernel 5.2 and the issue still exists.
Tested on this device:
ID 148f:3070 Ralink Technology, Corp. RT2870/RT3070 Wireless Adapter
but the same applies to many other devices, too

dmesg after plug in the device:

[75.482165] usb 1-2: new high-speed USB device number 6 using xhci_hcd
[75.639236] usb 1-2: New USB device found, idVendor=148f, idProduct=3070, bcdDevice= 1.01
[75.639238] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[75.639239] usb 1-2: Product: 802.11 n WLAN
[75.639240] usb 1-2: Manufacturer: Ralink
[75.639241] usb 1-2: SerialNumber: 1.0
[75.952611] usb 1-2: reset high-speed USB device number 6 using xhci_hcd
[76.107232] ieee80211 phy1: rt2x00_set_rt: Info - RT chipset 3070, rev 0201 detected
[76.120228] ieee80211 phy1: rt2x00_set_rf: Info - RF chipset 0005 detected
[76.121079] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
[76.130873] usbcore: registered new interface driver rt2800usb
[76.194447] audit: type=1130 audit(1562833499.983:49): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[76.195313] rt2800usb 1-2:1.0 wlp0s20f0u2: renamed from wlan0
[76.216178] ieee80211 phy1: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[76.241382] ieee80211 phy1: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.36
[76.544022] ieee80211 phy1: rt2x00usb_vendor_request: Error - Vendor Request 0x06 failed for offset 0x0404 with error -71
[77.562305] ieee80211 phy1: rt2800_wait_csr_ready: Error - Unstable hardware
[77.562316] ieee80211 phy1: rt2800usb_set_device_state: Error - Device failed to enter state 4 (-5)
...
followed by this message on access to the interface:
[341.598563] xhci_hcd 0000:00:14.0: WARN Cannot submit Set TR Deq Ptr
[341.598573] xhci_hcd 0000:00:14.0: A Set TR Deq Ptr command is pending.
Comment 39 Michael 2019-07-11 08:57:33 UTC
BTW:
The tested device is an ALFA AWUS036NH and I really can't see "Unstable hardware" here.
Comment 40 Bernhard 2019-07-11 11:23:41 UTC
I don't really think the problem is caused by the WIFI stick itself, maybe the cause is the xHCI controller from the motherboard? We're both using a 300-series AM4 board(even the same brand), so we probably have the same controller.

Btw. I've already tried the git snapshot from 5.3-rc1, problem isn't fixed there either.
Comment 41 Michael 2019-07-11 11:43:46 UTC
No, I don't think it's the controller. I'm running three different systems here:
RYZEN 1700, MSI X370 KRAIT
INTEL I5-6200U, ASUS X555U (notebook)
INTEL i7-3930K, ASUS P9X79
and all of them running into the same issue. Also, not all of the testing devices are affected. Some devices are still working as expected (for example TENDA W311U+), while others failed epically (ALFA AWUSH036NH). The same applies to several bluetooth devices.
Absolutely new (and really funny) is the error message "Unstable hardware" on 5.2.
Comment 42 Michael 2019-07-11 13:46:59 UTC
And 5.2 makes things more worse. Most of my adapters are not working.

EDIMAX EW-7711UAN V2
ID 7392:7710 Edimax Technology Co., Ltd

[  228.451035] usb 1-2: new high-speed USB device number 53 using xhci_hcd
[  228.629543] usb 1-2: New USB device found, idVendor=7392, idProduct=7710, bcdDevice= 0.00
[  228.629548] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  228.629550] usb 1-2: Product: Edimax Wi-Fi
[  228.629552] usb 1-2: Manufacturer: MediaTek
[  228.629554] usb 1-2: SerialNumber: 1.0
[  228.779827] usb 1-2: reset high-speed USB device number 53 using xhci_hcd
[  229.037761] mt7601u 1-2:1.0: ASIC revision: 76010001 MAC revision: 76010500
[  229.064654] mt7601u 1-2:1.0: Firmware Version: 0.1.00 Build: 7640 Build time: 201302052146____
[  230.045089] mt7601u 1-2:1.0: EEPROM ver:0d fae:00
[  230.055724] mt7601u 1-2:1.0: EEPROM country region 01 (channels 1-13)
[  230.763955] mt7601u 1-2:1.0: Warning: mt7601u_mcu_wait_resp retrying
[  231.084339] mt7601u 1-2:1.0: Warning: mt7601u_mcu_wait_resp retrying
[  231.404311] mt7601u 1-2:1.0: Warning: mt7601u_mcu_wait_resp retrying
[  231.724294] mt7601u 1-2:1.0: Warning: mt7601u_mcu_wait_resp retrying
[  232.044298] mt7601u 1-2:1.0: Warning: mt7601u_mcu_wait_resp retrying
[  232.044301] mt7601u 1-2:1.0: Error: mt7601u_mcu_wait_resp timed out
[  232.044485] xhci_hcd 0000:03:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
[  232.046810] xhci_hcd 0000:03:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
[  232.197641] mt7601u 1-2:1.0: Vendor request req:07 off:0080 failed:-71
[  232.347631] mt7601u 1-2:1.0: Vendor request req:02 off:0080 failed:-71
[  232.497630] mt7601u 1-2:1.0: Vendor request req:02 off:0080 failed:-71
[  232.497675] mt7601u: probe of 1-2:1.0 failed with error -110


LOGILINK WL0150
ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter

[  527.994013] usb 1-2: new high-speed USB device number 86 using xhci_hcd
[  528.238517] usb 1-2: New USB device found, idVendor=148f, idProduct=5370, bcdDevice= 1.01
[  528.238519] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  528.238521] usb 1-2: Product: 802.11 n WLAN
[  528.238522] usb 1-2: Manufacturer: Ralink
[  528.238523] usb 1-2: SerialNumber: 1.0
[  528.495914] usb 1-2: reset high-speed USB device number 86 using xhci_hcd
[  528.747058] ieee80211 phy81: rt2x00_set_rt: Info - RT chipset 5390, rev 0502 detected
[  529.426163] ieee80211 phy81: rt2x00_set_rf: Info - RF chipset 5370 detected
[  529.432544] ieee80211 phy81: Selected rate control algorithm 'minstrel_ht'
[  529.433131] usbcore: registered new interface driver rt2800usb
[  529.447058] audit: type=1130 audit(1562850994.757:43): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[  529.447260] rt2800usb 1-2:1.0 wlp3s0f0u2: renamed from wlan0
[  534.453471] audit: type=1131 audit(1562850999.761:44): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[  560.993915] ieee80211 phy81: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[  561.000105] ieee80211 phy81: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.36
[  599.002238] xhci_hcd 0000:03:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.


Delock Bluetooth USB :
ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)

[bluetooth]# scan on
Failed to start discovery: org.bluez.Error.NotReady

[ 1641.910015] usb 1-2: new full-speed USB device number 94 using xhci_hcd
[ 1642.126667] usb 1-2: device descriptor read/64, error -71
[ 1644.002791] usb 1-2: New USB device found, idVendor=0a12, idProduct=0001, bcdDevice=52.76
[ 1644.002795] usb 1-2: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[ 1644.002798] usb 1-2: Product: BT2.0
[ 1644.026094] audit: type=1130 audit(1562852109.344:79): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ 1644.286731] Bluetooth: hci0: hardware error 0x37


Logilink Bluetooth USB
ID 0a12:0001 Cambridge Silicon Radio, Ltd Bluetooth Dongle (HCI mode)

[bluetooth]# scan on
Failed to start discovery: org.bluez.Error.NotReady

[ 1641.910015] usb 1-2: new full-speed USB device number 94 using xhci_hcd
[ 1642.126667] usb 1-2: device descriptor read/64, error -71
[ 1644.002791] usb 1-2: New USB device found, idVendor=0a12, idProduct=0001, bcdDevice=52.76
[ 1644.002795] usb 1-2: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[ 1644.002798] usb 1-2: Product: BT2.0
[ 1644.026094] audit: type=1130 audit(1562852109.344:79): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ 1644.286731] Bluetooth: hci0: hardware error 0x37

Also funny this error message, here: "hardware error".


DL-Link DBT-122 Bluetooth USB
ID 07d1:f101 D-Link System DBT-122 Bluetooth

[bluetooth]# scan on
Failed to start discovery: org.bluez.Error.NotReady

The device list of not working devices is long....
Comment 43 Michael 2019-07-11 13:51:21 UTC
Sorry, copy and paste error of the last dmesg log. Due to several tests, dmesg log was flooded by warnings and error messages.
I'll stop the tests and will wait for next LTS kernel.
Comment 44 Michael 2019-07-12 06:25:29 UTC
BTW:
For me the issue started at this point:
https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?h=x86/build&id=72a9c673636b779e370983fea08e40f97039b981
when the Linux kernel's default i386/x86_64 kernel configurations shiped with USB 3.0 support enabled (CONFIG_USB_XHCI_HCD).
Comment 45 Stanislaw Gruszka 2019-07-19 10:32:02 UTC
Looks like there was requested a debug tracing, what was ignored:

https://lore.kernel.org/linux-usb/520462de-9a7f-d3f3-2cce-e4be045cf8b2@linux.intel.com/
Comment 46 Bernhard 2019-07-19 11:31:44 UTC
I didn't ignore it, I sent it to Mathias Nyman only, and not to the whole mailing list("Send output to me" didn't sound like I should send it to the whole mailing list but idk). I have to admit that the first traces weren't really useful though, when I ran the commands he told me the traces started too late(because the error happens immediately after system startup, so when I run this commands after startup the important part is missing). 

Then he gave me instructions how to enable tracing at startup, which only resulted in this error: [ 0.172042] Failed to enable trace event: xhci-hcd
and the tracing file was empty afterwards. 

Just about one week ago I had another idea how I could get it working, and it actually worked. The solution was to just unplug the wifi stick at boot, then enable tracing and plug in the stick again(I don't know why I didn't try that a few months ago tbh). I've sent the two files(dmesg and tracing) to Mathias Nyman again, but this time he didn't respond(I've sent the mail on July 11th). 

Should I send the whole tracing file and dmesg log to the mailing list instead? What is the preferred way to send files that are too big for an e-mail(tracing is around 17.6MB in size)?
Comment 47 Stanislaw Gruszka 2019-07-22 07:54:20 UTC
Bernhard, thanks for the update and provide debug data to the maintainer.

I think you should ping him on mailing list and ask if anything else need to be provided or how to precede otherwise. Maybe we can we just revert the patch?

This issue is annoying and I see more users entering it (and blaming mt76x0u or rt2800usb drivers). It should not be hard to fix since is regression (commit causing it is known) and is reproducible.

Please also point that changes in process_bulk_intr_td() are main cause of the problem as stated in comment 20.
Comment 48 Michael 2019-07-29 17:12:12 UTC
This issue is blaming nearly everything (like this SAMSUNG Galaxy S3):

[34385.294067] usb 1-2: new high-speed USB device number 6 using xhci_hcd
[34385.465017] usb 1-2: New USB device found, idVendor=18d1, idProduct=4ee7, bcdDevice= 2.26
[34385.465022] usb 1-2: New USB device strings: Mfr=2, Product=3, SerialNumber=4
[34385.465025] usb 1-2: Product: GT-I9300
[34385.465028] usb 1-2: Manufacturer: samsung
...
[35074.182055] xhci_hcd 0000:03:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
Comment 49 Michael 2019-08-24 07:03:55 UTC
Bernhard, running my RYZEN for some days and noticed that tha xhci issue also 
affected the USB keyboard and the USB mouse:


At this time, the system is allready running for 2 days:
Aug 24 08:38:41.665376 tux1 kernel: usb 1-12: new low-speed USB device number 19 using xhci_hcd
Aug 24 08:38:42.001609 tux1 kernel: usb 1-12: New USB device found, idVendor=046a, idProduct=0011, bcdDevice= 1.00
Aug 24 08:38:42.001850 tux1 kernel: usb 1-12: New USB device strings: Mfr=0, Product=0, SerialNumber=0
Aug 24 08:38:42.098291 tux1 kernel: hid-generic 0003:046A:0011.0003: input,hidraw0: USB HID v1.11 Keyboard [HID 046a:0011] on usb-0000:03:00.0-12/input0
Aug 24 08:38:43.631091 tux1 kernel: usb 1-12: input irq status -75 received
Aug 24 08:38:43.631384 tux1 kernel: usb usb1-port12: disabled by hub (EMI?), re-enabling...
Aug 24 08:38:43.631409 tux1 kernel: usb 1-12: USB disconnect, device number 19
Aug 24 08:38:44.025057 tux1 kernel: usb 1-12: new low-speed USB device number 20 using xhci_hcd
Aug 24 08:38:44.361600 tux1 kernel: usb 1-12: New USB device found, idVendor=046a, idProduct=0011, bcdDevice= 1.00
Aug 24 08:38:44.361839 tux1 kernel: usb 1-12: New USB device strings: Mfr=0, Product=0, SerialNumber=0
Aug 24 08:38:44.401604 tux1 kernel: input: HID 046a:0011 as /devices/pci0000:00/0000:00:01.3/0000:03:00.0/usb1/1-12/1-12:1.0/0003:046A:0011.0004/input/input18
Aug 24 08:38:44.458277 tux1 kernel: hid-generic 0003:046A:0011.0004: input,hidraw0: USB HID v1.11 Keyboard [HID 046a:0011] on usb-0000:03:00.0-12/input0
Aug 24 08:38:49.031776 tux1 kernel: usb 1-12: input irq status -75 received
Aug 24 08:38:49.032082 tux1 kernel: usb usb1-port12: disabled by hub (EMI?), re-enabling...
Aug 24 08:38:49.032099 tux1 kernel: usb 1-12: USB disconnect, device number 20
Aug 24 08:38:49.425365 tux1 kernel: usb 1-12: new low-speed USB device number 21 using xhci_hcd
Aug 24 08:39:04.905175 tux1 kernel: usb 1-12: device descriptor read/64, error -110
Aug 24 08:39:20.478280 tux1 kernel: usb 1-12: device descriptor read/64, error -110
Aug 24 08:39:20.774967 tux1 kernel: usb 1-12: new low-speed USB device number 22 using xhci_hcd
Aug 24 08:39:36.331757 tux1 kernel: usb 1-12: device descriptor read/64, error -110
Aug 24 08:39:51.838723 tux1 kernel: usb 1-12: device descriptor read/64, error -110
Aug 24 08:39:51.945370 tux1 kernel: usb usb1-port12: attempt power cycle
Aug 24 08:39:52.588394 tux1 kernel: usb 1-12: new low-speed USB device number 23 using xhci_hcd
Aug 24 08:39:57.415723 tux1 kernel: usb 1-12: Device not responding to setup address.
Aug 24 08:40:02.448295 tux1 kernel: usb 1-12: Device not responding to setup address.
Aug 24 08:40:02.655042 tux1 kernel: usb 1-12: device not accepting address 23, error -71
Aug 24 08:40:02.778269 tux1 kernel: usb 1-12: new low-speed USB device number 24 using xhci_hcd
Aug 24 08:40:07.604975 tux1 kernel: usb 1-12: Device not responding to setup address.
Aug 24 08:40:12.638751 tux1 kernel: usb 1-12: Device not responding to setup address.
Aug 24 08:40:12.845561 tux1 kernel: usb 1-12: device not accepting address 24, error -71
Aug 24 08:40:12.845696 tux1 kernel: usb usb1-port12: unable to enumerate USB device

At this time only hard power off will help.

I got rid of that and reverted the ugly xhci patch. Will now see if that will solve the xhci issue.
Comment 50 Bernhard 2019-08-24 11:40:45 UTC
Was one of the affected USB devices plugged in and you rebooted to get the wifi working? Or did that happen even without the device plugged in?

I've noticed once that even after if I rebooted my system to get wifi working, my external HDD didn't work after plugging it in, so I had to reboot again to get that working... 

I'm just using the LTS kernel right now, which works fine for me, but because of that bug I'm kinda limited when choosing a distribution since most distros don't offer different kernel versions and I don't really want to recompile my kernel every time.
Comment 51 Michael 2019-08-24 12:27:45 UTC
No, it happened without a warning. Keyboard LED flashed some times, according to the device descriptor errors. This was the first time I noticed something like that and only on the RYZEN machine.
We talked about that xhci issue in other (git) threads, too:
https://github.com/aircrack-ng/rtl8812au/issues/376#issuecomment-522169478

BTW:
LTS kernel (4.19) still working fine here, too. In my opinion xhci host is unstable since 4.20. I noticed that everytime, when testing/improving a driver.
Comment 52 Michael 2019-08-24 14:04:56 UTC
I noticed the same behavior. Not on an USB hdd, but on an USB ram:

This is an INTENSO USB 2 ALU LINE 64 GB USB stick:

[ 1032.600762] usb 1-11.4: new high-speed USB device number 15 using xhci_hcd
[ 1032.626487] hub 1-11:1.0: hub_ext_port_status failed (err = -71)
[ 1032.629487] usb 1-11-port4: cannot reset (err = -71)
[ 1032.632491] usb 1-11-port4: cannot reset (err = -71)
[ 1032.635486] usb 1-11-port4: cannot reset (err = -71)
[ 1032.638482] usb 1-11-port4: cannot reset (err = -71)
[ 1032.638483] usb 1-11-port4: Cannot enable. Maybe the USB cable is bad?

The stick is ok plugged in on another port:
[ 1465.770379] usb 1-11.4: USB disconnect, device number 23
[ 1708.302214] usb 1-2: new high-speed USB device number 24 using xhci_hcd
[ 1708.471933] usb 1-2: New USB device found, idVendor=058f, idProduct=6387, bcdDevice= 1.ff
[ 1708.471938] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1708.471940] usb 1-2: Product: Intenso Alu Line
[ 1708.471943] usb 1-2: Manufacturer: 6989
[ 1708.471945] usb 1-2: SerialNumber: 21F84CE8
[ 1708.479111] usb-storage 1-2:1.0: USB Mass Storage device detected

re-plugged in on 1-11-port4:
[ 1776.661289] usb 1-11.4: new high-speed USB device number 25 using xhci_hcd
[ 1776.810678] usb 1-11.4: New USB device found, idVendor=058f, idProduct=6387, bcdDevice= 1.ff
[ 1776.810684] usb 1-11.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1776.810687] usb 1-11.4: Product: Intenso Alu Line
[ 1776.810691] usb 1-11.4: Manufacturer: 6989
[ 1776.810694] usb 1-11.4: SerialNumber: 21F84CE8
[ 1776.817710] usb-storage 1-11.4:1.0: USB Mass Storage device detected


That leads me to the assumption that the xhci host is unstable, at least in combination with my controller:


[    1.325164] xhci_hcd 0000:03:00.0: hcc params 0x0200ef81 hci version 0x110 quirks 0x0000000008000410
[    1.325319] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.02
[    1.325321] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.325322] usb usb1: Product: xHCI Host Controller
[    1.325323] usb usb1: Manufacturer: Linux 5.2.9-arch1-1-ARCH xhci-hcd
[    1.325323] usb usb1: SerialNumber: 0000:03:00.0
[    1.325428] hub 1-0:1.0: USB hub found
[    1.325443] hub 1-0:1.0: 14 ports detected
[    1.325922] xhci_hcd 0000:03:00.0: xHCI Host Controller
[    1.325925] xhci_hcd 0000:03:00.0: new USB bus registered, assigned bus number 2
[    1.325927] xhci_hcd 0000:03:00.0: Host supports USB 3.1 Enhanced SuperSpeed
[    1.325958] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[    1.325974] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.02
[    1.325976] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.325977] usb usb2: Product: xHCI Host Controller
[    1.325978] usb usb2: Manufacturer: Linux 5.2.9-arch1-1-ARCH xhci-hcd
[    1.325979] usb usb2: SerialNumber: 0000:03:00.0
[    1.326046] hub 2-0:1.0: USB hub found
[    1.326057] hub 2-0:1.0: 8 ports detected
[    1.326289] usb: port power management may be unreliable
[    1.326451] xhci_hcd 0000:25:00.0: xHCI Host Controller
[    1.326454] xhci_hcd 0000:25:00.0: new USB bus registered, assigned bus number 3
[    1.381302] xhci_hcd 0000:25:00.0: hcc params 0x0200ef81 hci version 0x110 quirks 0x0000000000000010
[    1.381657] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.02
[    1.381658] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.381658] usb usb3: Product: xHCI Host Controller
[    1.381659] usb usb3: Manufacturer: Linux 5.2.9-arch1-1-ARCH xhci-hcd
[    1.381660] usb usb3: SerialNumber: 0000:25:00.0
[    1.381737] hub 3-0:1.0: USB hub found
[    1.381744] hub 3-0:1.0: 2 ports detected
[    1.381830] xhci_hcd 0000:25:00.0: xHCI Host Controller
[    1.381832] xhci_hcd 0000:25:00.0: new USB bus registered, assigned bus number 4
[    1.381834] xhci_hcd 0000:25:00.0: Host supports USB 3.0 SuperSpeed
[    1.381863] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
[    1.381878] usb usb4: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.02
[    1.381880] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.381880] usb usb4: Product: xHCI Host Controller
[    1.381881] usb usb4: Manufacturer: Linux 5.2.9-arch1-1-ARCH xhci-hcd
[    1.381882] usb usb4: SerialNumber: 0000:25:00.0
[    1.381941] hub 4-0:1.0: USB hub found
[    1.381947] hub 4-0:1.0: 2 ports detected
[    1.382075] xhci_hcd 0000:27:00.3: xHCI Host Controller
[    1.382077] xhci_hcd 0000:27:00.3: new USB bus registered, assigned bus number 5
[    1.382170] xhci_hcd 0000:27:00.3: hcc params 0x0270f665 hci version 0x100 quirks 0x0000000000000410
[    1.382268] usb usb5: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.02
[    1.382269] usb usb5: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.382270] usb usb5: Product: xHCI Host Controller
[    1.382271] usb usb5: Manufacturer: Linux 5.2.9-arch1-1-ARCH xhci-hcd
[    1.382272] usb usb5: SerialNumber: 0000:27:00.3
[    1.382335] hub 5-0:1.0: USB hub found
[    1.382341] hub 5-0:1.0: 4 ports detected
[    1.382498] xhci_hcd 0000:27:00.3: xHCI Host Controller
[    1.382500] xhci_hcd 0000:27:00.3: new USB bus registered, assigned bus number 6
[    1.382501] xhci_hcd 0000:27:00.3: Host supports USB 3.0 SuperSpeed
[    1.382512] usb usb6: We don't know the algorithms for LPM for this host, disabling LPM.
[    1.382527] usb usb6: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.02
[    1.382528] usb usb6: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.382529] usb usb6: Product: xHCI Host Controller
[    1.382530] usb usb6: Manufacturer: Linux 5.2.9-arch1-1-ARCH xhci-hcd
[    1.382531] usb usb6: SerialNumber: 0000:27:00.3
Comment 53 Michael 2019-09-07 10:19:48 UTC
tested another USB controller (at this time 3.1) and the results are even worse than on USB 3.0:
USB controller: Advanced Micro Devices, Inc. [AMD] X370 Series Chipset USB 3.1 xHCI Controller (rev 02)
and
TENDA W311U+
ID 148f:3070 Ralink Technology, Corp. RT2870/RT3070 Wireless Adapter
This device is one of the few that work on an USB 3.0 controller 
Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) 

but it failed epically on USB 3.1:
[ 1213.285622] rt2800usb 5-3.1.2:1.0 wlp39s0f3u3u1u2: renamed from wlan0
[ 1218.918384] ieee80211 phy6: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[ 1218.918427] ieee80211 phy6: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.36
[ 1219.222282] device wlp39s0f3u3u1u2 entered promiscuous mode
[ 1220.797413] rt2800usb_tx_sta_fifo_read_completed: 186 callbacks suppressed
[ 1220.797417] ieee80211 phy6: rt2800usb_tx_sta_fifo_read_completed: Warning - TX status read failed -71
[ 1220.797452] ieee80211 phy6: rt2800usb_tx_sta_fifo_read_completed: Warning - TX status read failed -71
[ 1220.797531] ieee80211 phy6: rt2800usb_tx_sta_fifo_read_completed: Warning - TX status read failed -71
[ 1220.797611] ieee80211 phy6: rt2800usb_tx_sta_fifo_read_completed: Warning - TX status read failed -71
[ 1220.797692] ieee80211 phy6: rt2800usb_tx_sta_fifo_read_completed: Warning - TX status read failed -71
[ 1220.797772] ieee80211 phy6: rt2800usb_tx_sta_fifo_read_completed: Warning - TX status read failed -71
[ 1220.797851] ieee80211 phy6: rt2800usb_tx_sta_fifo_read_completed: Warning - TX status read failed -71
[ 1220.797931] ieee80211 phy6: rt2800usb_tx_sta_fifo_read_completed: Warning - TX status read failed -71
[ 1220.798011] ieee80211 phy6: rt2800usb_tx_sta_fifo_read_completed: Warning - TX status read failed -71
[ 1220.798091] ieee80211 phy6: rt2800usb_tx_sta_fifo_read_completed: Warning - TX status read failed -71
[ 1220.814661] xhci_hcd 0000:27:00.3: WARN Cannot submit Set TR Deq Ptr
[ 1220.814663] xhci_hcd 0000:27:00.3: A Set TR Deq Ptr command is pending.
[ 1221.378769] ieee80211 phy6: rt2x00queue_flush_queue: Warning - Queue 0 failed to flush
[ 1221.409201] device wlp39s0f3u3u1u2 left promiscuous mode


I really hope it will be fixed until we reach next LTS-KERNEL.
Comment 54 Michael 2019-09-07 10:40:39 UTC
and more and more devices are affected:
https://github.com/dresden-elektronik/deconz-rest-plugin/issues/1640
Comment 55 Michael 2019-09-08 09:09:09 UTC
@  Stanislaw Gruszka
We once talked about a rt2800usb issue (rt2800usb stops receiving) here:
https://bugzilla.kernel.org/show_bug.cgi?id=202243#c19

Now, I'm not sure, if it is related to this xhci issue or not, because I get it sometimes on kernel 4.19, too.

After doing setsockopt PACKET_MR_PROMISC:
https://github.com/ZerBea/hcxdumptool/blob/master/hcxdumptool.c#L5513

dmesg will show this warning (in this case running an USB 2.0 controller):
[ 1687.106514] device wlp3s0f0u2 entered promiscuous mode
[ 1687.106551] audit: type=1700 audit(1567932110.523:46): dev=wlp3s0f0u2 prom=256 old_prom=0 auid=1000 uid=0 gid=0 ses=2
[ 1718.525815] ieee80211 phy0: rt2x00queue_flush_queue: Warning - Queue 14 failed to flush
[ 1718.558846] device wlp3s0f0u2 left promiscuous mode
[ 1718.558888] audit: type=1700 audit(1567932141.974:47): dev=wlp3s0f0u2 prom=0 old_prom=256 auid=1000 uid=0 gid=0 ses=2

The adapter stops working until it is plugged out and plugged in again:
[ 1722.950110] usb 1-2: USB disconnect, device number 5

If you think it is not related to this issue, I can open a new rt2800usb issue.
Comment 56 Koen 2019-09-22 12:02:02 UTC
Hi,

a google search led me here. I'm getting the same error on my Lenovo Thinkpad X220 running Kubuntu 19.04. Everytime I plug in an USB memory stick or a SD card I get the following messages in dmesg:

[ 9649.078958] xhci_hcd 0000:05:00.0: WARN Cannot submit Set TR Deq Ptr
[ 9649.078966] xhci_hcd 0000:05:00.0: A Set TR Deq Ptr command is pending.

Linux koen-ThinkPad-X220 5.0.0-29-generic #31-Ubuntu SMP Thu Sep 12 13:05:32 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Koen
Comment 57 Doug Gale 2019-09-23 22:24:32 UTC
Got this issue on 5.0.0-29-generic, host hardware is Ryzen 2700X on B350 chipset (Asus Prime B350-Plus).

USB Device is Samsung Galaxy A5, Model SM-A520W, Android 8.0

[57460.411327] usb 1-4.1.4: USB disconnect, device number 10
[57460.411566] xhci_hcd 0000:02:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
[57460.685963] usb 1-4.1.4: new high-speed USB device number 11 using xhci_hcd
[57460.830379] usb 1-4.1.4: New USB device found, idVendor=04e8, idProduct=6860, bcdDevice= 4.00
[57460.830382] usb 1-4.1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[57460.830383] usb 1-4.1.4: Product: SAMSUNG_Android
[57460.830385] usb 1-4.1.4: Manufacturer: SAMSUNG
[57460.830386] usb 1-4.1.4: SerialNumber: **withheld**

doug@doug-dt:~$ sudo lspci -s 2:0.0 -vvvvvv
[sudo] password for doug: 
02:00.0 USB controller: Advanced Micro Devices, Inc. [AMD] 300 Series Chipset USB 3.1 xHCI Controller (rev 02) (prog-if 30 [XHCI])
	Subsystem: ASMedia Technology Inc. 300 Series Chipset USB 3.1 xHCI Controller

I have this kernel parameter to prevent other USB issues: usbcore.autosuspend=-1

Linux doug-dt 5.0.0-29-generic #31~18.04.1-Ubuntu SMP Thu Sep 12 18:29:21 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Comment 58 Michael 2019-09-24 06:30:55 UTC
This issue still exists on
$ uname -r
5.3.1-arch1-1-ARCH

Sep 24 08:14:00.374050 tux1 kernel: device wlp3s0f0u2 entered promiscuous mode
Sep 24 08:14:39.757848 tux1 kernel: xhci_hcd 0000:03:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
Sep 24 08:14:39.758158 tux1 kernel: xhci_hcd 0000:03:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
Sep 24 08:14:39.770950 tux1 kernel: mt7601u 1-2:1.0: Warning: TX DMA did not stop!

xhci host is running completely instable after receiving the first warning: 
WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state
Ignoring this warning, the whole system freezes. At this time only a "hard" power off will help.

BTW:
Shouldn't we increase importance (next kernel will be LTS - and this issue will reach the major distributions).
Comment 59 Bernhard 2019-09-24 14:04:54 UTC
I have noticed that I don't get that error("WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state") anymore, even though I still have the same USB issues(maybe something in the rt2800usb driver changed, idk). I've even tried applying all the patches in the "for-usb-linus" branch from Mathias Nyman's git repo - but I still have the same issue. 

Maybe more people should send a message to the usb kernel mailing list(linux-usb@vger.kernel.org)? I didn't get a response the last time but maybe they will address this issue if they see that more users are affected by this regression. 

BTW @Michael:
There is a commit in the for-usb-linus branch that could fix the system freezes you've encountered: https://git.kernel.org/pub/scm/linux/kernel/git/mnyman/xhci.git/commit/?h=for-usb-linus&id=750ed908bbb57153c75b79c50135e7cc94feb4a5
Comment 60 Michael 2019-09-24 14:40:26 UTC
@Bernhard.
Thanks. I'll check it. Also thanks for setting prio to high.
Until the system freezes, I receive the funniest warnings from the xhci system: bad cable, bad device, firmware not loaded,... 

"WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state" depend also on the device:
Running a 
148f:3070 Ralink Technology, Corp. RT2870/RT3070 Wireless Adapter
I got no "WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state"

Running
148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter
I got the warning.

Both of them using the rt2800usb driver.

That and the different warnings let me assume, the xhci host is running completely instable, especially when hcxdumptool doing high workload.
Comment 61 Michael 2019-09-26 11:31:27 UTC
It seems that the commit is working - no freeze, up to now.
Comment 62 Michael 2019-09-27 17:40:26 UTC
Nop, doesn't work as expected. No freezes, but:

[ 2914.285601] ieee80211 phy77: Atheros AR9271 Rev:1
[ 2914.286229] ath9k_htc 1-3:1.0 wlp0s20f0u3: renamed from wlan0
[ 2914.389748] usb 1-3: USB disconnect, device number 83
[ 2914.749819] ath: phy77: Failed to wakeup in 500us
[ 2914.760221] ath: phy77: Failed to wakeup in 500us
[ 2914.770309] ath: phy77: Failed to wakeup in 500us
[ 2914.780411] ath: phy77: Failed to wakeup in 500us
[ 2915.283332] usb 1-3: ath9k_htc: Firmware ath9k_htc/htc_9271-1.4.0.fw requested
[ 2915.531824] usb 1-3: ath9k_htc: Firmware - ath9k_htc/htc_9271-1.4.0.fw download failed
[ 2915.532206] usb 1-3: ath9k_htc: USB layer deinitialized
[ 2928.339410] ------------[ cut here ]------------
[ 2928.339505] WARNING: CPU: 1 PID: 704 at net/mac80211/rx.c:804 ieee80211_rx_napi.cold+0xc/0x67 [mac80211]
[ 2928.339506] Modules linked in: ath9k_htc ath9k_common ath9k_hw ath nfnetlink_queue nfnetlink_log nfnetlink ccm uas usb_storage rt2800usb rt2x00usb rt2800lib rt2x00lib fuse nls_iso8859_1 nls_cp437 vfat fat nvidia_drm(POE) nvidia_modeset(POE) nvidia(POE) uvcvideo snd_soc_skl videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 snd_soc_hdac_hda snd_hda_codec_hdmi videobuf2_common snd_hda_ext_core videodev snd_soc_skl_ipc snd_hda_codec_realtek rtsx_usb_ms memstick mc snd_soc_sst_ipc x86_pkg_temp_thermal snd_soc_sst_dsp r8169 intel_powerclamp snd_soc_acpi_intel_match snd_soc_acpi coretemp snd_soc_core kvm_intel snd_hda_codec_generic ledtrig_audio realtek snd_compress rtl8821ae ac97_bus kvm libphy irqbypass snd_pcm_dmaengine ipmi_devintf btcoexist ipmi_msghandler crct10dif_pclmul crc32_pclmul i915 rtl_pci rtlwifi mac80211 ghash_clmulni_intel joydev cfg80211 mousedev aesni_intel mei_hdcp libarc4 iTCO_wdt aes_x86_64 i2c_hid crypto_simd snd_hda_intel i2c_algo_bit cryptd asus_nb_wmi iTCO_vendor_support
.....

At this time xhci crashed TP-LINK TL722WN v1.
And that device worked, before...
xhci is still running completely unstable and the delivered warnings are unpredictable.
Comment 63 Vinicius 2019-10-01 02:47:09 UTC
Just providing some information that could be helpful to debug the issue. It is also affecting me.

Kernel version:
# uname -a
Linux arch 5.3.1-arch1-1-ARCH #1 SMP PREEMPT Sat Sep 21 11:33:49 UTC 2019 x86_64 GNU/Linux

Hardware specs: AMD Ryzen 5 2400G

The issue happens when I plug in an Alfa AWUS036NH (148f:3070 Ralink Technology, Corp. RT2870/RT3070) - It uses the module rt2800usb

Below you can find my dmesg output when I plug in the Alfa device:

---
[ 1130.410091] usb 1-10: new high-speed USB device number 5 using xhci_hcd
[ 1130.653103] usb 1-10: New USB device found, idVendor=148f, idProduct=3070, bcdDevice= 1.01
[ 1130.653108] usb 1-10: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1130.653111] usb 1-10: Product: 802.11 n WLAN
[ 1130.653113] usb 1-10: Manufacturer: Ralink
[ 1130.653114] usb 1-10: SerialNumber: 1.0
[ 1130.864470] usb 1-10: reset high-speed USB device number 5 using xhci_hcd
[ 1131.110058] ieee80211 phy1: rt2x00_set_rt: Info - RT chipset 3070, rev 0201 detected
[ 1131.788103] ieee80211 phy1: rt2x00_set_rf: Info - RF chipset 0005 detected
[ 1131.794331] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
[ 1131.833798] rt2800usb 1-10:1.0 wlp1s0f0u10: renamed from wlan0
[ 1131.834234] audit: type=1130 audit(1569896348.109:56): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ 1131.867763] ieee80211 phy1: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[ 1131.867797] ieee80211 phy1: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.36
[ 1136.117228] xhci_hcd 0000:01:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
[ 1136.840084] audit: type=1131 audit(1569896353.117:57): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
---


I don't know if this is useful, but I do have another USB WiFi that uses another module but doesn't trigger the issue when I plug in:
lsusb output: 2357:010c TP-Link TL-WN722N v2

Below is the dmesg output when I plug in the TP-LINK:

---
[ 1697.619576] usb 1-7: new high-speed USB device number 9 using xhci_hcd
[ 1697.846601] usb 1-7: New USB device found, idVendor=2357, idProduct=010c, bcdDevice= 0.00
[ 1697.846603] usb 1-7: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1697.846605] usb 1-7: Product: 802.11n NIC
[ 1697.846606] usb 1-7: Manufacturer: Realtek
[ 1697.846607] usb 1-7: SerialNumber: 00E04C0001
[ 1697.858603] Chip Version Info: CHIP_8188E_Normal_Chip_TSMC_D_CUT_1T1R_RomVer(0)
[ 1698.262531] r8188eu 1-7:1.0 wlp1s0f0u7: renamed from wlan0
[ 1711.847379] MAC Address = c0:25:e9:1f:5c:3c
[ 1712.075372] R8188EU: indicate disassoc
---

Additionally, I see the warning when I plug in a Samsung Galaxy S5 device, but the warning appears only when I select certain "USB modes" in Android. Below you can see the dmesg log for each one of the USB modes:

--- dmesg log for "No data transfer" USB mode ---
[ 2523.666729] usb 1-7: USB disconnect, device number 32
[ 2524.157919] usb 1-7: new high-speed USB device number 33 using xhci_hcd
[ 2524.402980] usb 1-7: New USB device found, idVendor=18d1, idProduct=4ee7, bcdDevice= 2.32
[ 2524.402985] usb 1-7: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2524.402987] usb 1-7: Product: SAMSUNG_Android
[ 2524.402989] usb 1-7: Manufacturer: SAMSUNG
[ 2524.402991] usb 1-7: SerialNumber: 19a6e4d5


--- dmesg log for "PTP" USB mode ---
[ 2529.713679] usb 1-7: USB disconnect, device number 33
[ 2529.714018] xhci_hcd 0000:01:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
[ 2530.207346] usb 1-7: new high-speed USB device number 34 using xhci_hcd
[ 2530.452843] usb 1-7: New USB device found, idVendor=04e8, idProduct=6866, bcdDevice= 2.32
[ 2530.452847] usb 1-7: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2530.452850] usb 1-7: Product: SAMSUNG_Android
[ 2530.452852] usb 1-7: Manufacturer: SAMSUNG
[ 2530.452854] usb 1-7: SerialNumber: 19a6e4d5


--- dmesg log for "USB Tethering" USB mode ---
[ 2533.697810] usb 1-7: USB disconnect, device number 34
[ 2533.698156] xhci_hcd 0000:01:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
[ 2534.183649] usb 1-7: new high-speed USB device number 35 using xhci_hcd
[ 2534.430728] usb 1-7: New USB device found, idVendor=04e8, idProduct=6864, bcdDevice= 2.32
[ 2534.430730] usb 1-7: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2534.430732] usb 1-7: Product: SAMSUNG_Android
[ 2534.430733] usb 1-7: Manufacturer: SAMSUNG
[ 2534.430734] usb 1-7: SerialNumber: 19a6e4d5
[ 2534.464706] rndis_host 1-7:1.0: rndis media connect
[ 2534.510921] rndis_host 1-7:1.0 usb0: register 'rndis_host' at usb-0000:01:00.0-7, RNDIS device, 6e:36:5a:07:cd:06
[ 2534.552158] rndis_host 1-7:1.0 enp1s0f0u7: renamed from usb0
[ 2534.641284] audit: type=1130 audit(1569897751.028:73): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'


--- dmesg log for "File Transfer" USB mode ---
[ 2536.996343] usb 1-7: USB disconnect, device number 35
[ 2536.996703] rndis_host 1-7:1.0 enp1s0f0u7: unregister 'rndis_host' usb-0000:01:00.0-7, RNDIS device
[ 2536.997131] xhci_hcd 0000:01:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
[ 2537.014124] xhci_hcd 0000:01:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
[ 2537.500061] usb 1-7: new high-speed USB device number 36 using xhci_hcd
[ 2537.754684] usb 1-7: New USB device found, idVendor=04e8, idProduct=6860, bcdDevice= 4.00
[ 2537.754688] usb 1-7: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2537.754690] usb 1-7: Product: SAMSUNG_Android
[ 2537.754691] usb 1-7: Manufacturer: SAMSUNG
[ 2537.754692] usb 1-7: SerialNumber: 19a6e4d5



I hope these logs can help you to debug the issue.
Comment 64 Bernhard 2019-10-01 12:55:04 UTC
@Vinicius
Which motherboard do you have? 

Maybe the issue is related to 300-series motherboards...
Comment 65 Vinicius 2019-10-02 00:36:58 UTC
My motherboard is a Biostar B350GT3.
Comment 66 Bernhard 2019-10-03 12:14:08 UTC
I've sent another mail to the kernel usb mailing list, this time I got a response. I sent them kernel debugging logs/traces from xhci, unfortunately I have one of the devices where the error "WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state." doesn't get shown anymore, which makes it harder to find the cause for the problem.

@Michael
Could you do the following steps, upload the dmesg log and trace file somewhere and post the link to the files here(or send them directly to the mailing list yourself, if you prefer that)? When using one of the devices where the error gets shown obviously.


1. start the PC with an affected kernel, but without the affected device plugged in, then run the following commands as root
2. mount -t debugfs none /sys/kernel/debug
3. echo 'module xhci_hcd =p' >/sys/kernel/debug/dynamic_debug/control
4. echo 'module usbcore =p' >/sys/kernel/debug/dynamic_debug/control
5. echo 81920 > /sys/kernel/debug/tracing/buffer_size_kb
6. echo 1 > /sys/kernel/debug/tracing/events/xhci-hcd/enable
7. Plug in the affected device
8. Send output of dmesg and the /sys/kernel/debug/tracing/trace file(upload them somewhere, especially the trace file will be big)

Thanks in advance
Comment 67 Michael 2019-10-03 15:08:46 UTC
Here it goes:
https://www.sendspace.com/file/413hlj

ALFA AWUS036NH connected to USB 3.x port running stress test using hcxdumptool.
Comment 68 Michael 2019-10-05 12:07:06 UTC
If the error occurred once, xhci will be unusable for all other devices:

[20480.414467] usb 1-2: new full-speed USB device number 6 using xhci_hcd
[20480.717690] usb 1-2: New USB device found, idVendor=1546, idProduct=01a7, bcdDevice= 1.00
[20480.717695] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[20480.717698] usb 1-2: Product: u-blox 7 - GPS/GNSS Receiver
[20480.717700] usb 1-2: Manufacturer: u-blox AG - www.u-blox.com
[20480.726485] cdc_acm 1-2:1.0: ttyACM0: USB ACM device
[20480.760327] audit: type=1130 audit(1570274963.323:75): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=gpsdctl@ttyACM0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[20486.732259] usb 1-2: USB disconnect, device number 6
[20486.746846] audit: type=1131 audit(1570274969.310:76): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=gpsdctl@ttyACM0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[20487.027593] usb 1-2: new full-speed USB device number 7 using xhci_hcd
[20487.244298] usb 1-2: device descriptor read/64, error -71
[20487.540954] usb 1-2: device descriptor read/64, error -71
[20487.837571] usb 1-2: new full-speed USB device number 8 using xhci_hcd
[20487.991378] usb 1-2: device descriptor read/64, error -71
[20488.287616] usb 1-2: device descriptor read/64, error -71
[20488.394301] usb usb1-port2: attempt power cycle
[20489.037910] usb 1-2: new full-speed USB device number 9 using xhci_hcd
[20489.065424] usb 1-2: Device not responding to setup address.
[20489.271605] usb 1-2: Device not responding to setup address.
[20489.477900] usb 1-2: device not accepting address 9, error -71
Comment 69 Bernhard 2019-10-13 01:45:31 UTC
Good News!
After reading a bit in the xhci spec sheet I've figured out what the problem is. I've already created a patch and sent it to the mailing list, so it will hopefully be fixed in 5.4.

If you want to see or try the patch, you can find it here: https://marc.info/?l=linux-usb&m=157092844415047
Comment 70 Bernhard 2019-10-14 10:16:58 UTC
Nevermind, I've misunderstood something in the xhci spec sheet, apparently the xhci slot id isn't the same as the "TT Hub slot id".
Comment 71 Mathias Nyman 2019-10-15 14:50:55 UTC
Created attachment 285501 [details]
Patch adding doorbell tracing

Patch that adds even more tracing, this will show if xhci driver
correctly rings endpoint doorbell to start endpoint after soft retry
Comment 72 Bernhard 2019-10-15 18:25:33 UTC
Created attachment 285505 [details]
Dmesg log and trace file

Not sure how useful the logs from my device are, because the error "WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state" only gets shown after unplugging the device, but it looks like the error messages are mostly the same.

There are still some differences compared to Michaels device though:
Dmesg from him(the one I've also sent to the mailing list):
[   96.789306] xhci_hcd 0000:03:00.0: Resetting device with slot ID 4
[   96.789313] xhci_hcd 0000:03:00.0: // Ding dong!
[   96.791053] xhci_hcd 0000:03:00.0: Completed reset device command.
[   96.791111] xhci_hcd 0000:03:00.0: Successful reset device command.

compared to mine:
[   91.777887] xhci_hcd 0000:15:00.0: Resetting device with slot ID 4
[   91.777892] xhci_hcd 0000:15:00.0: // Ding dong!
[   91.777940] xhci_hcd 0000:15:00.0: Completed reset device command.
[   91.777950] xhci_hcd 0000:15:00.0: Can't reset device (slot ID 4) in default state
[   91.777951] xhci_hcd 0000:15:00.0: Not freeing device rings.
[   91.777956] xhci_hcd 0000:15:00.0: // Ding dong!
Comment 73 Michael 2019-10-16 09:12:30 UTC
Some times the warning doesn't appear. Instead the the driver crashed:
$ dmidecode
Manufacturer: ASUSTeK COMPUTER INC.
Product Name: X555UB

$ cat /proc/cpuinfo
model name	: Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz

device connected to USB 3:

[10799.155340] usb 1-2: reset high-speed USB device number 12 using xhci_hcd
[10799.310446] ieee80211 phy5: rt2x00_set_rt: Info - RT chipset 3070, rev 0201 detected
[10799.364982] ieee80211 phy5: rt2x00_set_rf: Info - RF chipset 0005 detected
[10799.365842] ieee80211 phy5: Selected rate control algorithm 'minstrel_ht'
[10799.412456] rt2800usb 1-2:1.0 wlp0s20f0u2: renamed from wlan0
[10799.432236] ieee80211 phy5: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[10799.432263] ieee80211 phy5: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.36
[10799.728051] ieee80211 phy5: rt2x00usb_vendor_request: Error - Vendor Request 0x06 failed for offset 0x0404 with error -71
[10800.745185] ieee80211 phy5: rt2800_wait_csr_ready: Error - Unstable hardware
[10800.745197] ieee80211 phy5: rt2800usb_set_device_state: Error - Device failed to enter state 4 (-5)
...
[11237.887923] xhci_hcd 0000:00:14.0: WARN Cannot submit Set TR Deq Ptr
[11237.887929] xhci_hcd 0000:00:14.0: A Set TR Deq Ptr command is pending.

xhci is unstable - not the hardware.


The same device, connected to the same notebook, but to a USB 2 port:
[11243.042957] usb 1-3: reset high-speed USB device number 13 using xhci_hcd
[11243.197261] ieee80211 phy6: rt2x00_set_rt: Info - RT chipset 3070, rev 0201 detected
[11243.251969] ieee80211 phy6: rt2x00_set_rf: Info - RF chipset 0005 detected
[11243.253036] ieee80211 phy6: Selected rate control algorithm 'minstrel_ht'
[11243.272919] rt2800usb 1-3:1.0 wlp0s20f0u3: renamed from wlan0
[11243.293056] ieee80211 phy6: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[11243.293082] ieee80211 phy6: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.36
Comment 74 Bernhard 2019-10-16 10:58:18 UTC
@Michael 
Could you apply the patch from Mathias(comment 71) to the kernel, enable xhci tracing(steps in comment 66), and upload the dmesg and trace file?
The patch adds more tracing which will make it easier to find the exact issue.
Comment 75 Mathias Nyman 2019-10-17 15:01:06 UTC
@Bernhard

Logs with added tracing show that driver does ring the endpoint doorbell, so
host controller should start processing the pending requests. Endpoint is
in stopped state as it should after endpoint reset, before we ring the doorbell.

So this part looks like hardware isn't doing its part.

when class driver starts cancelling transfer requests after some timeout time, we can see that the endpoint is in halted state. Host controller didn't issue any
event when endpoint turned into halted state. so driver is unaware of this state.

There is also a bug in the driver how the error is handled later. After the timeout, when class driver starts cancelling transfers, and xhci driver tries to stop the endpoint to cancel tranfers, it sohuld react to the context state error,
and check endpoint state, and handle the halted endpoint p
Driver should react to this, it should detect and handle the halted endpoint before attempting to set a new dequeue pointer. Now it just bluntly tries to set
a new dequeue pointer, and fails.

Details:
* We get a transaction error event, for transfer request (TRB) at 0xf61a0000

96.985254: xhci_handle_event: EVENT: TRB 00000000f61a0000 status 'USB Transaction Error' len 3860 slot 4 ep 3 type 'Transfer Event' flags e:C
96.985262: xhci_handle_transfer: BULK: Buffer 00000000ff32b04c length 3860 TD size 0 intr 0 type 'Normal' flags b:i:I:c:s:I:e:C

* We issue a Reset endpoint command to resolve the halted endpoint
 (move endpoint from halted to stopped state)

96.985264: xhci_queue_trb: CMD: Reset Endpoint Command: ctx 0000000000000000 slot 4 ep 3 flags C
96.985265: xhci_inc_enq: CMD 0000000090dd7572: enq 0x00000000fff7e550(0x00000000fff7e000) deq 0x00000000fff7e540(0x00000000fff7e000) segs 1 
96.985266: xhci_ring_host_doorbell: Ring doorbell for Command Ring 0 
96.985268: xhci_inc_deq: EVENT 000000005715d3fc: enq 0x00000000fff7c000(0x00000000fff7c000) deq 0x00000000fff7c4a0(0x00000000fff7c000) segs 1 

* Reset endpoint command successfully, endpoint state is now "stopped"

96.985395: xhci_handle_event: EVENT: TRB 00000000fff7e540 status 'Success' len 0 slot 4 ep 0 type 'Command Completion Event' flags e:C
96.985396: xhci_handle_command: CMD: Reset Endpoint Command: ctx 0000000000000000 slot 4 ep 3 flags C
96.985397: xhci_handle_cmd_reset_ep: State stopped mult 1 max P. Streams 0 interval 125 us max ESIT payload 0 CErr 3 Type Bulk IN burst 0 maxp 512 deq 00000000f61a0001 avg \
trb len 0

* We ring the doorbell, xHC hardware should start processing events on ring,

96.985402: xhci_ring_ep_doorbell: Ring doorbell for Slot 4 ep1in 

* but nothing happends, this endpoint i silent until class driver starts cancelling Transfers ~25 seconds later

122.813121: xhci_urb_dequeue: ep1in-bulk: urb 00000000790ce3f7 pipe 3221259648 slot 4 length 0/3860 sgs 0/0 stream 0 flags 00010200
122.813134: xhci_dbg_cancel_urb: Cancel URB 00000000790ce3f7, dev 4, ep 0x81, starting at offset 0xf61a07f0

* stop the endpoint to cancel the pending transfers
 
122.813137: xhci_queue_trb: CMD: Stop Ring Command: slot 4 sp 0 ep 3 flags C
122.813137: xhci_inc_enq: CMD 0000000090dd7572: enq 0x00000000fff7e560(0x00000000fff7e000) deq 0x00000000fff7e550(0x00000000fff7e000) segs 1 
122.813138: xhci_ring_host_doorbell: Ring doorbell for Command Ring 0 
122.813141: xhci_urb_dequeue: ep1in-bulk: urb 000000009d35e579 pipe 3221259648 slot 4 length 0/3860 sgs 0/0 stream 0 flags 00010200

* Stop endpoit fails with "Context State Error"
 Endpoint is halted, not stopped, but driver doesn't handle this    

122.813605: xhci_handle_event: EVENT: TRB 00000000fff7e550 status 'Context State Error' len 0 slot 4 ep 0 type 'Command Completion Event' flags e:c
122.813606: xhci_handle_command: CMD: Stop Ring Command: slot 4 sp 0 ep 3 flags C
122.813606: xhci_handle_cmd_stop_ep: State halted mult 1 max P. Streams 0 interval 125 us max ESIT payload 0 CErr 3 Type Bulk IN burst 0 maxp 512 deq 00000000f61a0001

* Driver tries to queue new dequeue pointer anyway

122.813605: xhci_handle_event: EVENT: TRB 00000000fff7e550 status 'Context State Error' len 0 slot 4 ep 0 type 'Command Completion Event' flags e:c
122.813606: xhci_handle_command: CMD: Stop Ring Command: slot 4 sp 0 ep 3 flags C
122.813606: xhci_handle_cmd_stop_ep: State halted mult 1 max P. Streams 0 interval 125 us max ESIT payload 0 CErr 3 Type Bulk IN burst 0 maxp 512 deq 00000000f61a0001

* setting new dequeue pointer fails, endpoint is still halted

122.813820: xhci_handle_event: EVENT: TRB 00000000fff7e560 status 'Context State Error' len 0 slot 4 ep 0 type 'Command Completion Event' flags e:c
122.813820: xhci_handle_command: CMD: Set TR Dequeue Pointer Command: deq 00000000f61a0011 stream 0 slot 4 ep 3 flags C
122.813821: xhci_handle_cmd_set_deq: RS 00000 high-speed Ctx Entries 12 MEL 0 us Port# 8/0 [TT Slot 0 Port# 0 TTT 0 Intr 0] Addr 4 State configured
122.813821: xhci_handle_cmd_set_deq_ep: State halted mult 1 max P. Streams 0 interval 125 us max ESIT payload 0 CErr 3 Type Bulk IN burst 0 maxp 512 deq 00000000f61a0001
Comment 76 Mathias Nyman 2019-10-17 15:10:39 UTC
you could try to flush the endpoint ringing PCI write, and see if it helps
starting the endpint, but I don't have high hopes for this, a PCI write should
be flushed anyway, especially in 25 seconds.

maybe also add trace to re-read the endpoint state after flushing pci write:
(untested)

diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index e74518e7de6a..20e209b64551 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -408,6 +408,7 @@ void xhci_ring_ep_doorbell(struct xhci_hcd *xhci,
        trace_xhci_ring_ep_doorbell(slot_id, DB_VALUE(ep_index, stream_id));
 
        writel(DB_VALUE(ep_index, stream_id), db_addr);
+       readl(db_addr);
        /* The CPU has better things to do at this point than wait for a
         * write-posting flush.  It'll get there soon enough.
         */
@@ -1176,6 +1177,8 @@ static void xhci_handle_cmd_reset_ep(struct xhci_hcd *xhci, int slot_id,
        /* if this was a soft reset, then restart */
        if ((le32_to_cpu(trb->generic.field[3])) & TRB_TSP)
                ring_doorbell_for_active_rings(xhci, slot_id, ep_index);
+
+       trace_xhci_handle_cmd_reset_ep(ep_ctx);
 }
Comment 77 Bernhard 2019-10-17 19:27:14 UTC
Created attachment 285527 [details]
Logs after flushing endpoint

I've applied the patch, but it seems like the endpoint doesn't get started even after flushing the endpoint.
Comment 78 Michael 2019-10-18 06:37:57 UTC
@Bernhard, can't do further going tests at the moment, because I'm on vacation until November.
Comment 79 Mathias Nyman 2019-10-29 16:17:25 UTC
Created attachment 285709 [details]
Patch handling halted endpoints at completion of stop endpoint command

Patch to handle a context state error at stop endpoint completion
where a endpoint TRB processing had a error/stall, and hardware halted the
endpoint just before completing normal stop endpoint command.

This won't fix the initial issue about endpoint not restarting after
soft retry, but it should resolve the flood of "WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state" messages

Code is completely untested as I can't trigger this codepath manually.
It requires hardware halting a endpoint just before completing a stop
endpoint command
Comment 80 Bernhard 2019-10-30 03:22:06 UTC
Created attachment 285713 [details]
Logs after applying the patch

After applying the patch the "WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state" messages are indeed gone, and the issue is (as expected) still there.
Comment 81 Mathias Nyman 2019-10-30 09:28:39 UTC
(In reply to Bernhard from comment #80)
> Created attachment 285713 [details]
> Logs after applying the patch

Did you by mistake attach some old logs?
Comment 82 Bernhard 2019-10-30 12:59:58 UTC
Created attachment 285717 [details]
Logs after applying the patch

Yes, looks like I've uploaded the zip file from the wrong folder. The new file should be the right one.
Comment 83 Michael 2019-10-30 18:42:43 UTC
The "WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state" doesn't flood the log file. The message appear only if the device is disconnected (after xhci died):

Connected the device:
[42407.193511] usb 1-2: ath9k_htc: USB layer deinitialized
[42410.956671] usb 1-2: new high-speed USB device number 9 using xhci_hcd
[42411.214091] usb 1-2: New USB device found, idVendor=0cf3, idProduct=9271, bcdDevice= 1.08
[42411.214095] usb 1-2: New USB device strings: Mfr=16, Product=32, SerialNumber=48
[42411.214098] usb 1-2: Product: USB2.0 WLAN
[42411.214100] usb 1-2: Manufacturer: ATHEROS
[42411.214102] usb 1-2: SerialNumber: 12345
[42411.232116] usb 1-2: ath9k_htc: Firmware ath9k_htc/htc_9271-1.4.0.fw requested
[42412.308181] usb 1-2: ath9k_htc: Transferred FW: ath9k_htc/htc_9271-1.4.0.fw, size: 51008
[42412.558320] ath9k_htc 1-2:1.0: ath9k_htc: HTC initialized with 33 credits
[42412.784721] ath9k_htc 1-2:1.0: ath9k_htc: FW Version: 1.4
[42412.784724] ath9k_htc 1-2:1.0: FW RMW support: On
[42412.784726] ath: EEPROM regdomain: 0x809c
[42412.784727] ath: EEPROM indicates we should expect a country code
[42412.784728] ath: doing EEPROM country->regdmn map search
[42412.784729] ath: country maps to regdmn code: 0x52
[42412.784730] ath: Country alpha2 being used: CN
[42412.784731] ath: Regpair used: 0x52
[42412.788460] ieee80211 phy2: Atheros AR9271 Rev:1
[42412.791852] ath9k_htc 1-2:1.0 wlp3s0f0u2: renamed from wlan0

and everything is looking fine.

after running the device for a few minutes
[42445.806367] device wlp3s0f0u2 entered promiscuous mode

we receive the first indication that xhci died
[42911.706734] ath: phy2: Unable to set channel

and the device stops working. There are absolutely no other error messages, shwon by dmesg or the running application (in this case hcxdumptool).

Now we disconnect the device and got the final warning:
[43082.759737] usb 1-2: USB disconnect, device number 9
[43082.760434] xhci_hcd 0000:03:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
[43082.760607] xhci_hcd 0000:03:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
[43082.764275] xhci_hcd 0000:03:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
[43082.784722] device wlp3s0f0u2 left promiscuous mode

At this point xhci is dead. No other device connected to the same port is working.
Comment 84 Mathias Nyman 2019-10-31 09:02:56 UTC
(In reply to Michael from comment #83)
> The "WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state"
> doesn't flood the log file. The message appear only if the device is
> disconnected (after xhci died):
> 

Could you take full logs and traces of this:

mount -t debugfs none /sys/kernel/debug
echo 'module xhci_hcd =p' >/sys/kernel/debug/dynamic_debug/control
echo 'module usbcore =p' >/sys/kernel/debug/dynamic_debug/control
echo 81920 > /sys/kernel/debug/tracing/buffer_size_kb
echo 1 > /sys/kernel/debug/tracing/events/xhci-hcd/enable
< Trigger the issue >
Send output of dmesg
Send content of /sys/kernel/debug/tracing/trace

In Bernhards case there were issues both with hardware not starting the
ring after soft retry, and software not handling context state error when stopping an endpoint. Second issue can be fixed in driver.
Comment 85 Michael 2019-10-31 09:35:59 UTC
I try to trigger it. That isn't so easy, because different devices showing different behavior and the occurrence of the issue is totally random. Sometimes it happens immediately after connecting the device and sometimes it happens after a while or heavy stressing the device.

BTW:
mount -t debugfs none /sys/kernel/debug
is done by default here.
Comment 86 Michael 2019-10-31 09:55:57 UTC
I'm doing several runs, using different devices. So we have the chance to compare them against each other.
Comment 87 Michael 2019-10-31 10:16:24 UTC
Here go.
https://www.sendspace.com/file/8ybhnk

Unfortunately it looks like this stress test was to heavy for dmesg's ringbuffer.
Comment 88 Michael 2019-11-01 13:17:38 UTC
After several tests, I assume that this warning:
"rt2x00queue_flush_queue: Warning - Queue 14 failed to flush"
is also related to the xhci issue. I don't think that the issue is related to powermanagement (https://bugzilla.kernel.org/show_bug.cgi?id=61621), because pwrmgt is disabled, here.


affected: rt2800usb
[ 7384.825764] usb 1-2: new high-speed USB device number 8 using xhci_hcd
[ 7385.069208] usb 1-2: New USB device found, idVendor=148f, idProduct=3070, bcdDevice= 1.01
[ 7385.069211] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 7385.069214] usb 1-2: Product: 802.11 n WLAN
[ 7385.069216] usb 1-2: Manufacturer: Ralink
[ 7385.069217] usb 1-2: SerialNumber: 1.0
[ 7385.280539] usb 1-2: reset high-speed USB device number 8 using xhci_hcd
[ 7385.526260] ieee80211 phy3: rt2x00_set_rt: Info - RT chipset 3070, rev 0201 detected
[ 7386.204480] ieee80211 phy3: rt2x00_set_rf: Info - RF chipset 0005 detected
[ 7386.210679] ieee80211 phy3: Selected rate control algorithm 'minstrel_ht'
[ 7386.227147] rt2800usb 1-2:1.0 wlp3s0f0u2: renamed from wlan0
[ 7386.227812] audit: type=1130 audit(1572610437.724:150): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[ 7387.737404] ieee80211 phy3: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[ 7387.737440] ieee80211 phy3: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.36
Comment 89 Michael 2019-11-02 07:55:40 UTC
The bad thing on this issue is that it isn't detectable by an application, while the device is plugged in. The device doesn't start or stops working without any warning. The application says every thing is fine and dmesg showing absolutely no warning.
Only when the device is plugged out, we get a bunch of warnings, depending on the device (tested on INTEL and AMD systems):
"WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state"
"rt2x00queue_flush_queue: Warning - Queue 14 failed to flush"
"rx urb failed: -71"
"A Set TR Deq Ptr command is pending."
and more (bad cable, hardware error, ....).


BTW:
I'm running kernel 4.19.80 in parallel and every thing is fine here. This issue appeared for the first time on 4.20.
Comment 90 Mathias Nyman 2019-11-04 09:36:02 UTC
Seems that it was a known issue that xHCI on AMD platforms can fail to restart an endpoint if it wasn't running when the stop command was issued. This also applies to Berhards case where the endpoint stop command raced with an error halting the endpoint.
See patch:

commit 28a2369f7d72ece55089f33e7d7b9c1223673cc3
Author: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
Date:   Thu Jul 20 14:48:28 2017 +0300

    usb: xhci: Issue stop EP command only when the EP state is running
    
    on AMD platforms with SNPS 3.1 USB controller if stop endpoint command is
    issued the controller does not respond, when the EP is not in running
    state. HW completes the command execution and reports
    "Context State Error" completion code. This is as per the spec. However
    HW on receiving the second command additionally marks EP to Flow control
    state in HW which is RTL bug. This bug causes the HW not to respond
    to any further doorbells that are rung by the driver. This makes the EP
    to not functional anymore and causes gross functional failures.
    
    As a workaround, not to hit this problem, it's better to check the EP state
    and issue a stop EP command only when the EP is in running state.
    
    As a sidenote, even with this patch there is still a possibility of
    triggering the RTL bug if the context state races with the stop endpoint
    command as described in xHCI spec 4.6.9
    
    [code simplification and reworded sidenote in commit message -Mathias]
    Signed-off-by: Shyam Sundar S K <Shyam-sundar.S-k@amd.com>
    Signed-off-by: Nehal Shah <Nehal-bakulchandra.Shah@amd.com>
    Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Does anybody have a link to that errata?
Comment 91 Michael 2019-11-04 09:42:59 UTC
I can't confirm that, because this issue happens on all platforms if the device is connected to an USB 3 port:
RYZEN 1700, MSI X370 KRAIT
INTEL I5-6200U, ASUS X555U (notebook)
INTEL i7-3930K, ASUS P9X79
Comment 92 Michael 2019-11-04 09:52:22 UTC
The only systems which are running without this issue are my Raspberry Pi's:
$ uname -r
4.19.80-2-ARCH
Comment 93 Michael 2019-11-05 10:56:05 UTC
Generating a lot of traffic on the socket, causes xhci to die very early.

Here it happened on an AMD RYZEN system, running hcxdumptool:
[ 8316.184018] device wlp3s0f0u2 entered promiscuous mode
[ 8372.392206] ath: phy0: Unable to remove monitor interface at idx: 0
[ 8374.525500] ath: phy0: Unable to remove station entry for monitor mode
[ 8381.692889] usb 1-2: USB disconnect, device number 5
[ 8381.693576] xhci_hcd 0000:03:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or 

and here on an INTEL notebook running NetworkManager:
[  166.174157] usb 1-1: new high-speed USB device number 8 using xhci_hcd
[  166.330703] usb 1-1: New USB device found, idVendor=148f, idProduct=761a, bcdDevice= 1.00
[  166.330713] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  166.330719] usb 1-1: Product: WiFi
[  166.330725] usb 1-1: Manufacturer: MediaTek
[  166.330729] usb 1-1: SerialNumber: 1.0
[  166.458249] usb 1-1: reset high-speed USB device number 8 using xhci_hcd
[  166.607874] usb 1-1: ASIC revision: 76100002 MAC revision: 76502000
[  167.669762] usb 1-1: EEPROM ver:02 fae:01
[  203.846465] mt76u_complete_rx: 13 callbacks suppressed
[  203.846479] usb 1-1: rx urb failed: -71
[  203.846552] usb 1-1: rx urb failed: -71
[  203.846614] usb 1-1: rx urb failed: -71
[  203.846667] usb 1-1: rx urb failed: -71
[  203.846712] usb 1-1: rx urb failed: -71
[  203.846799] usb 1-1: rx urb failed: -71
[  203.846874] usb 1-1: rx urb failed: -71
[  203.846924] usb 1-1: rx urb failed: -71
[  203.846998] usb 1-1: rx urb failed: -71
[  203.847069] usb 1-1: rx urb failed: -71
[  203.848249] usb 1-1: USB disconnect, device number 8
[  203.850032] xhci_hcd 0000:00:14.0: WARN Cannot submit Set TR Deq Ptr
[  203.850040] xhci_hcd 0000:00:14.0: A Set TR Deq Ptr command is pending.
Comment 94 Michael 2019-11-06 13:02:11 UTC
Running really heavy traffic, first xhci caused the driver to crash, than the whole system crashed:
System: ASUS X555UB (INTEL)

[ 1564.588784] mt7601u 1-2:1.0: Error: TSSI upper saturation
[ 1614.221860] ------------[ cut here ]------------
[ 1614.221923] WARNING: CPU: 1 PID: 0 at net/mac80211/rx.c:804 ieee80211_rx_napi.cold+0xc/0x67 [mac80211]
[ 1614.221924] Modules linked in: nfnetlink_queue nfnetlink_log nfnetlink uas usb_storage ccm mt7601u hid_generic usbhid fuse nls_iso8859_1 nls_cp437 vfat fat nvidia_drm(POE) nvidia_modeset(POE) nvidia(POE) uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_common videodev snd_soc_skl x86_pkg_temp_thermal intel_powerclamp snd_soc_hdac_hda coretemp mc kvm_intel snd_hda_ext_core rtl8821ae snd_soc_skl_ipc snd_soc_sst_ipc snd_soc_sst_dsp snd_soc_acpi_intel_match snd_soc_acpi kvm btcoexist snd_soc_core snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic joydev ledtrig_audio snd_compress mousedev ac97_bus snd_pcm_dmaengine irqbypass rtsx_usb_ms rtl_pci r8169 memstick rtlwifi i915 btusb mac80211 btrtl ipmi_devintf realtek ipmi_msghandler libphy i2c_algo_bit cfg80211 btbcm crct10dif_pclmul drm_kms_helper crc32_pclmul btintel ghash_clmulni_intel snd_hda_intel drm bluetooth snd_hda_codec libarc4 aesni_intel asus_nb_wmi snd_hda_core asus_wmi intel_gtt aes_x86_64
[ 1614.221947]  intel_rapl_msr agpgart ecdh_generic crypto_simd sparse_keymap i2c_hid cryptd rfkill iTCO_wdt mei_hdcp hid snd_hwdep glue_helper syscopyarea ecc sysfillrect iTCO_vendor_support sysimgblt fb_sys_fops snd_pcm pcspkr intel_cstate intel_uncore mxm_wmi intel_rapl_perf input_leds elan_i2c tpm_crb snd_timer tpm_tis snd tpm_tis_core tpm int3403_thermal soundcore intel_xhci_usb_role_switch evdev i2c_i801 roles processor_thermal_device mei_me mei rng_core idma64 mac_hid intel_lpss_pci intel_lpss intel_rapl_common int340x_thermal_zone intel_soc_dts_iosf intel_pch_thermal int3400_thermal acpi_thermal_rel asus_wireless wmi ac battery sg crypto_user ip_tables x_tables ext4 crc32c_generic crc16 mbcache jbd2 rtsx_usb_sdmmc mmc_core rtsx_usb sr_mod cdrom sd_mod serio_raw atkbd ahci libps2 libahci libata xhci_pci crc32c_intel scsi_mod xhci_hcd i8042 serio
[ 1614.221975] CPU: 1 PID: 0 Comm: swapper/1 Tainted: P        W  OE     5.3.8-arch1-1 #1
[ 1614.221976] Hardware name: ASUSTeK COMPUTER INC. X555UB/X555UB, BIOS X555UB.301 02/20/2017
[ 1614.221993] RIP: 0010:ieee80211_rx_napi.cold+0xc/0x67 [mac80211]
[ 1614.221994] Code: 38 48 81 c1 70 04 00 00 48 81 c6 38 01 00 00 e8 0a 40 a1 d1 b8 01 00 00 00 e9 26 4b fb ff 48 c7 c7 60 7b c1 c0 e8 b7 53 4f d1 <0f> 0b 48 89 ef e8 7f 28 b4 d1 e9 d1 5b fb ff 48 c7 c7 60 7b c1 c0
[ 1614.221995] RSP: 0018:ffffa50840120e10 EFLAGS: 00010246
[ 1614.221996] RAX: 0000000000000024 RBX: ffff92206bc407a0 RCX: 0000000000000000
[ 1614.221997] RDX: 0000000000000000 RSI: ffff92207ba97708 RDI: 00000000ffffffff
[ 1614.221998] RBP: ffff922034510400 R08: 0000000000001137 R09: 0000000000000001
[ 1614.221998] R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000
[ 1614.221999] R13: 0000000000000001 R14: 0000000000000006 R15: 0000000000000000
[ 1614.222000] FS:  0000000000000000(0000) GS:ffff92207ba80000(0000) knlGS:0000000000000000
[ 1614.222000] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1614.222001] CR2: 00007f87cc12e000 CR3: 00000001d180a001 CR4: 00000000003606e0
[ 1614.222002] Call Trace:
[ 1614.222005]  <IRQ>
[ 1614.222010]  ? __mod_zone_page_state+0x66/0xa0
[ 1614.222014]  ? kmem_cache_free_bulk+0x2e1/0x450
[ 1614.222025]  ieee80211_tasklet_handler+0xbc/0xd0 [mac80211]
[ 1614.222028]  tasklet_action_common.isra.0+0x4a/0xb0
[ 1614.222031]  __do_softirq+0x114/0x332
[ 1614.222033]  irq_exit+0xd4/0xf0
[ 1614.222034]  do_IRQ+0xbb/0x130
[ 1614.222037]  common_interrupt+0xf/0xf
[ 1614.222038]  </IRQ>
[ 1614.222041] RIP: 0010:cpuidle_enter_state+0xc4/0x480
[ 1614.222042] Code: e8 41 d6 9b ff 80 7c 24 0f 00 74 17 9c 58 0f 1f 44 00 00 f6 c4 02 0f 85 93 03 00 00 31 ff e8 a3 6b a2 ff fb 66 0f 1f 44 00 00 <45> 85 e4 0f 88 be 02 00 00 49 63 cc 4c 2b 6c 24 10 48 8d 04 49 48
[ 1614.222042] RSP: 0018:ffffa508400cbe68 EFLAGS: 00000246 ORIG_RAX: ffffffffffffffda
[ 1614.222044] RAX: ffff92207ba80000 RBX: ffffffff932bcd60 RCX: 000000000000001f
[ 1614.222044] RDX: 0000000000000000 RSI: 00000000355556ca RDI: 0000000000000000
[ 1614.222045] RBP: ffff92207bab4200 R08: 00000177d71e2c19 R09: 0000000000001373
[ 1614.222046] R10: ffff92207baa9784 R11: ffff92207baa9764 R12: 0000000000000004
[ 1614.222046] R13: 00000177d71e2c19 R14: 0000000000000004 R15: ffff92207a148000
[ 1614.222049]  ? cpuidle_enter_state+0x9f/0x480
[ 1614.222051]  cpuidle_enter+0x29/0x40
[ 1614.222053]  do_idle+0x1de/0x260
[ 1614.222055]  cpu_startup_entry+0x19/0x20
[ 1614.222058]  start_secondary+0x185/0x1d0
[ 1614.222060]  secondary_startup_64+0xa4/0xb0
[ 1614.222062] ---[ end trace dee13b04de319021 ]---
[ 1614.222429] ------------[ cut here ]------------
Comment 95 Mathias Nyman 2019-11-08 14:43:07 UTC
Michael, I've been looking at the traces and can't find anything xhci related in your logs that could cause this. xhci isn't dying, crashig or causing other drivers to crash in the above logs either. It doesn't seem related to Bernhards case. 

Have you tried bisecting what patch causes the problems between 4.19 and 4.20 kernels?

The "WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state" is related to unplugging of the device. In short, while unplugging the device we get a transaction error for each running endpoint before the hub thread notices the disconnect, so xhci driver tries to recover the endpoint before everything is tore down and returned for the device. It's should be harmless at this stage.

There are several disconnect events initiated by device, or then actual physical
disconnect, could be related to firmware loading?

Traces also show many bulk-in urbs being queued but none completed until cancel at disconnect. so we are waiting 49 seconds to get data from the device before disconnect.

URB b2383f4 TRB is queued from ep4in, waiting for data from device:

  13714.468994: xhci_urb_enqueue: ep4in-bulk: urb 000000000b2383f4 pipe 3221360512 slot 14 length 0/4096 sgs 1/1 stream 0 flags 00040200
  13714.468996: xhci_queue_trb: BULK: Buffer 00000000ff5df000 length 4096 TD size 0 intr 0 type 'Normal' flags b:i:I:c:s:I:e:c
  13714.468996: xhci_inc_enq: BULK 0000000096dfdec9: enq 0x00000000feaec010(0x00000000feaec000) deq 0x00000000feaec000(0x00000000feaec000) segs 2 stream 0 free_trbs 508 bounce 512\

49 seconds later transaction error on ep4in on disconnect:

   13763.472759: xhci_handle_event: EVENT: TRB 00000000feaec000 status 'USB Transaction Error' len 4096 slot 14 ep 9 type 'Transfer Event' flags e:c
   ...   
   13763.472787: xhci_handle_event: EVENT: TRB 000000000a000000 status 'Success' len 0 slot 0 ep 0 type 'Port Status Change Event' flags e:c
   13763.472792: xhci_handle_port_status: port-1: Powered Not-connected Disabled Link:RxDetect PortSpeed:0 Change: CSC Wake: 

After this urb b2383f4 is canceled and given back:

  13763.474221: xhci_urb_dequeue: ep4in-bulk: urb 000000000b2383f4 pipe 3221360512 slot 14 length 0/4096 sgs 1/1 stream 0 flags 00040200
  13763.474225: xhci_dbg_cancel_urb: Cancel URB 000000000b2383f4, dev 2, ep 0x84, starting at offset 0xfeaec000
   ...
   13763.474673: xhci_urb_giveback: ep4in-bulk: urb 000000000b2383f4 pipe 3221360512 slot 14 length 0/4096 sgs 1/1 stream 0 flags 00040200
Comment 96 Michael 2019-11-08 15:24:58 UTC
Mathias, it is really hard to find the cause of that issue. dmesg is showing nothing until something crashed. I'm not able to detect the cause:
https://bugzilla.kernel.org/show_bug.cgi?id=202541#c89
At this point, I know:
- the driver stops working (independent of the driver - rt2800usb as well as mt76) 
- no warning, no error message)
- the system became instable (AMD as well as INTEL)
- kernel 4.20 up to 5.3

It is very unlikely that the driver caused this, because it doesn't happen on USB2 and it happens on different drivers and different systems.

I can try to bisect to identify the patch, but that will take a while.
Comment 97 Michael 2019-11-08 15:47:33 UTC
"WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state" only appeared when something went wrong.
If everything's fine and I plug out the device, this warning is not shown.

Here are the results from another device
ID 148f:3070 Ralink Technology, Corp. RT2870/RT3070 Wireless Adapter
running on an INTEL system.

dmesg output if everything is ok:
[14492.749187] usb 1-1: New USB device found, idVendor=148f, idProduct=3070, bcdDevice= 1.01
[14492.749197] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[14492.749203] usb 1-1: Product: 802.11 n WLAN
[14492.749208] usb 1-1: Manufacturer: Ralink
[14492.749213] usb 1-1: SerialNumber: 1.0
[14492.881097] usb 1-1: reset high-speed USB device number 20 using xhci_hcd
[14493.035766] ieee80211 phy11: rt2x00_set_rt: Info - RT chipset 3070, rev 0201 detected
[14493.090480] ieee80211 phy11: rt2x00_set_rf: Info - RF chipset 0005 detected
[14493.091489] ieee80211 phy11: Selected rate control algorithm 'minstrel_ht'
[14493.113656] rt2800usb 1-1:1.0 wlp0s20f0u1: renamed from wlan0
[14493.116525] audit: type=1130 audit(1573227592.687:137): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[14493.141430] ieee80211 phy11: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[14493.141456] ieee80211 phy11: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.36
[14498.126056] audit: type=1131 audit(1573227597.697:138): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[14506.300174] usb 1-1: USB disconnect, device number 20
[14506.463603] audit: type=1130 audit(1573227606.037:139): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'


demsg if the device stops working and something went wrong:
[14565.489976] usb 1-1: new high-speed USB device number 21 using xhci_hcd
[14565.648114] usb 1-1: New USB device found, idVendor=148f, idProduct=3070, bcdDevice= 1.01
[14565.648124] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[14565.648130] usb 1-1: Product: 802.11 n WLAN
[14565.648135] usb 1-1: Manufacturer: Ralink
[14565.648140] usb 1-1: SerialNumber: 1.0
[14565.773934] usb 1-1: reset high-speed USB device number 21 using xhci_hcd
[14565.927986] ieee80211 phy12: rt2x00_set_rt: Info - RT chipset 3070, rev 0201 detected
[14565.982385] ieee80211 phy12: rt2x00_set_rf: Info - RF chipset 0005 detected
[14565.983295] ieee80211 phy12: Selected rate control algorithm 'minstrel_ht'
[14566.002249] rt2800usb 1-1:1.0 wlp0s20f0u1: renamed from wlan0
[14566.004829] audit: type=1130 audit(1573227665.577:141): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[14566.018308] ieee80211 phy12: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[14566.018335] ieee80211 phy12: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.36
[14571.010706] audit: type=1131 audit(1573227670.584:142): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[14576.147069] ------------[ cut here ]------------
[14576.147136] WARNING: CPU: 1 PID: 0 at net/mac80211/rx.c:804 ieee80211_rx_napi.cold+0xc/0x67 [mac80211]
[14576.147137] Modules linked in: rt2800usb rt2x00usb rt2800lib rt2x00lib ath9k_htc ath9k_common ath9k_hw ath mt76x0u mt76x0_common mt76x02_usb mt76_usb mt76x02_lib mt76 ccm fuse nls_iso8859_1 nls_cp437 vfat fat nvidia_drm(POE) nvidia_modeset(POE) nvidia(POE) uvcvideo videobuf2_vmalloc videobuf2_memops snd_soc_skl videobuf2_v4l2 snd_soc_hdac_hda videobuf2_common snd_hda_ext_core videodev snd_soc_skl_ipc snd_soc_sst_ipc snd_soc_sst_dsp mc snd_soc_acpi_intel_match snd_soc_acpi snd_hda_codec_hdmi snd_hda_codec_realtek rtsx_usb_ms rtl8821ae snd_soc_core snd_compress ac97_bus snd_pcm_dmaengine snd_hda_codec_generic memstick ledtrig_audio r8169 x86_pkg_temp_thermal intel_powerclamp coretemp btcoexist rtl_pci joydev kvm_intel rtlwifi realtek mousedev i915 libphy btusb btrtl btbcm btintel kvm mac80211 ipmi_devintf bluetooth ipmi_msghandler i2c_algo_bit irqbypass snd_hda_intel drm_kms_helper snd_hda_codec drm cfg80211 crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_hda_core asus_nb_wmi asus_wmi
[14576.147158]  aesni_intel intel_gtt libarc4 snd_hwdep intel_rapl_msr agpgart snd_pcm aes_x86_64 crypto_simd mei_hdcp syscopyarea cryptd sparse_keymap i2c_hid ecdh_generic sysfillrect glue_helper iTCO_wdt sysimgblt rfkill iTCO_vendor_support fb_sys_fops intel_cstate intel_uncore ecc intel_rapl_perf mxm_wmi snd_timer snd intel_xhci_usb_role_switch input_leds pcspkr soundcore roles elan_i2c tpm_crb evdev processor_thermal_device tpm_tis intel_rapl_common tpm_tis_core mei_me int3403_thermal tpm int340x_thermal_zone mac_hid i2c_i801 mei rng_core intel_soc_dts_iosf intel_pch_thermal idma64 intel_lpss_pci intel_lpss int3400_thermal acpi_thermal_rel wmi asus_wireless ac battery sg crypto_user ip_tables x_tables ext4 crc32c_generic crc16 mbcache jbd2 rtsx_usb_sdmmc mmc_core rtsx_usb hid_generic usbhid hid sr_mod cdrom sd_mod ahci serio_raw libahci atkbd libps2 libata xhci_pci crc32c_intel scsi_mod xhci_hcd i8042 serio
[14576.147187] CPU: 1 PID: 0 Comm: swapper/1 Tainted: P        W  OE     5.3.8-arch1-1 #1
[14576.147187] Hardware name: ASUSTeK COMPUTER INC. X555UB/X555UB, BIOS X555UB.301 02/20/2017
[14576.147203] RIP: 0010:ieee80211_rx_napi.cold+0xc/0x67 [mac80211]
[14576.147205] Code: 38 48 81 c1 70 04 00 00 48 81 c6 38 01 00 00 e8 0a 40 8e f1 b8 01 00 00 00 e9 26 4b fb ff 48 c7 c7 60 7b 94 c0 e8 b7 53 3c f1 <0f> 0b 48 89 ef e8 7f 28 a1 f1 e9 d1 5b fb ff 48 c7 c7 60 7b 94 c0
[14576.147206] RSP: 0018:ffffab7a00120e10 EFLAGS: 00010246
[14576.147207] RAX: 0000000000000024 RBX: ffff9656387207a0 RCX: 0000000000000000
[14576.147207] RDX: 0000000000000000 RSI: 00000000000000f6 RDI: 00000000ffffffff
[14576.147208] RBP: ffff965615251400 R08: 0000000000000d40 R09: 0000000000000001
[14576.147209] R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000
[14576.147209] R13: 0000000000000001 R14: 0000000000000006 R15: 0000000000000000
[14576.147210] FS:  0000000000000000(0000) GS:ffff96563ba80000(0000) knlGS:0000000000000000
[14576.147211] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[14576.147211] CR2: 00005642ee566100 CR3: 000000019b00a001 CR4: 00000000003606e0
[14576.147212] Call Trace:
[14576.147214]  <IRQ>
[14576.147219]  ? __mod_zone_page_state+0x66/0xa0
[14576.147222]  ? _raw_spin_unlock_irqrestore+0x20/0x40
[14576.147224]  ? kmem_cache_free_bulk+0x2e1/0x450
[14576.147234]  ieee80211_tasklet_handler+0xbc/0xd0 [mac80211]
[14576.147237]  tasklet_action_common.isra.0+0x4a/0xb0
[14576.147239]  __do_softirq+0x114/0x332
[14576.147241]  irq_exit+0xd4/0xf0
[14576.147242]  do_IRQ+0xbb/0x130
[14576.147245]  common_interrupt+0xf/0xf
[14576.147246]  </IRQ>
[14576.147248] RIP: 0010:cpuidle_enter_state+0xc4/0x480
[14576.147249] Code: e8 41 d6 9b ff 80 7c 24 0f 00 74 17 9c 58 0f 1f 44 00 00 f6 c4 02 0f 85 93 03 00 00 31 ff e8 a3 6b a2 ff fb 66 0f 1f 44 00 00 <45> 85 e4 0f 88 be 02 00 00 49 63 cc 4c 2b 6c 24 10 48 8d 04 49 48
[14576.147250] RSP: 0018:ffffab7a000cbe68 EFLAGS: 00000246 ORIG_RAX: ffffffffffffffda
[14576.147251] RAX: ffff96563ba80000 RBX: ffffffffb2ebcd60 RCX: 000000000000001f
[14576.147252] RDX: 0000000000000000 RSI: 00000000355556ca RDI: 0000000000000000
[14576.147252] RBP: ffff96563bab4200 R08: 00000d41c610ca50 R09: 0000000000000000
[14576.147253] R10: ffff96563baa9784 R11: ffff96563baa9764 R12: 0000000000000008
[14576.147254] R13: 00000d41c610ca50 R14: 0000000000000008 R15: ffff96563a149ec0
[14576.147256]  ? cpuidle_enter_state+0x9f/0x480
[14576.147258]  cpuidle_enter+0x29/0x40
[14576.147260]  do_idle+0x1de/0x260
[14576.147262]  cpu_startup_entry+0x19/0x20
[14576.147265]  start_secondary+0x185/0x1d0
[14576.147267]  secondary_startup_64+0xa4/0xb0
[14576.147269] ---[ end trace 6c01ee4ff02c47b6 ]---
[14576.147743] ------------[ cut here ]------------
[14576.147775] WARNING: CPU: 1 PID: 272 at net/mac80211/rx.c:804 ieee80211_rx_napi.cold+0xc/0x67 [mac80211]
[14576.147775] Modules linked in: rt2800usb rt2x00usb rt2800lib rt2x00lib ath9k_htc ath9k_common ath9k_hw ath mt76x0u mt76x0_common mt76x02_usb mt76_usb mt76x02_lib mt76 ccm fuse nls_iso8859_1 nls_cp437 vfat fat nvidia_drm(POE) nvidia_modeset(POE) nvidia(POE) uvcvideo videobuf2_vmalloc videobuf2_memops snd_soc_skl videobuf2_v4l2 snd_soc_hdac_hda videobuf2_common snd_hda_ext_core videodev snd_soc_skl_ipc snd_soc_sst_ipc snd_soc_sst_dsp mc snd_soc_acpi_intel_match snd_soc_acpi snd_hda_codec_hdmi snd_hda_codec_realtek rtsx_usb_ms rtl8821ae snd_soc_core snd_compress ac97_bus snd_pcm_dmaengine snd_hda_codec_generic memstick ledtrig_audio r8169 x86_pkg_temp_thermal intel_powerclamp coretemp btcoexist rtl_pci joydev kvm_intel rtlwifi realtek mousedev i915 libphy btusb btrtl btbcm btintel kvm mac80211 ipmi_devintf bluetooth ipmi_msghandler i2c_algo_bit irqbypass snd_hda_intel drm_kms_helper snd_hda_codec drm cfg80211 crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_hda_core asus_nb_wmi asus_wmi
[14576.147791]  aesni_intel intel_gtt libarc4 snd_hwdep intel_rapl_msr agpgart snd_pcm aes_x86_64 crypto_simd mei_hdcp syscopyarea cryptd sparse_keymap i2c_hid ecdh_generic sysfillrect glue_helper iTCO_wdt sysimgblt rfkill iTCO_vendor_support fb_sys_fops intel_cstate intel_uncore ecc intel_rapl_perf mxm_wmi snd_timer snd intel_xhci_usb_role_switch input_leds pcspkr soundcore roles elan_i2c tpm_crb evdev processor_thermal_device tpm_tis intel_rapl_common tpm_tis_core mei_me int3403_thermal tpm int340x_thermal_zone mac_hid i2c_i801 mei rng_core intel_soc_dts_iosf intel_pch_thermal idma64 intel_lpss_pci intel_lpss int3400_thermal acpi_thermal_rel wmi asus_wireless ac battery sg crypto_user ip_tables x_tables ext4 crc32c_generic crc16 mbcache jbd2 rtsx_usb_sdmmc mmc_core rtsx_usb hid_generic usbhid hid sr_mod cdrom sd_mod ahci serio_raw libahci atkbd libps2 libata xhci_pci crc32c_intel scsi_mod xhci_hcd i8042 serio
[14576.147809] CPU: 1 PID: 272 Comm: systemd-journal Tainted: P        W  OE     5.3.8-arch1-1 #1
[14576.147809] Hardware name: ASUSTeK COMPUTER INC. X555UB/X555UB, BIOS X555UB.301 02/20/2017
[14576.147823] RIP: 0010:ieee80211_rx_napi.cold+0xc/0x67 [mac80211]
[14576.147824] Code: 38 48 81 c1 70 04 00 00 48 81 c6 38 01 00 00 e8 0a 40 8e f1 b8 01 00 00 00 e9 26 4b fb ff 48 c7 c7 60 7b 94 c0 e8 b7 53 3c f1 <0f> 0b 48 89 ef e8 7f 28 a1 f1 e9 d1 5b fb ff 48 c7 c7 60 7b 94 c0
[14576.147825] RSP: 0000:ffffab7a00120e10 EFLAGS: 00010246
[14576.147826] RAX: 0000000000000024 RBX: ffff9656387207a0 RCX: 0000000000000000
[14576.147827] RDX: 0000000000000000 RSI: ffff96563ba97708 RDI: 00000000ffffffff
[14576.147827] RBP: ffff965615251300 R08: 0000000000000d6c R09: 0000000000000001
[14576.147828] R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000
[14576.147828] R13: 0000000000000001 R14: 0000000000000006 R15: 0000000000000000
[14576.147829] FS:  00007f875aea1840(0000) GS:ffff96563ba80000(0000) knlGS:0000000000000000
[14576.147830] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[14576.147830] CR2: 00007f875a305a58 CR3: 0000000276ed8003 CR4: 00000000003606e0
[14576.147831] Call Trace:
[14576.147832]  <IRQ>
[14576.147834]  ? __mod_zone_page_state+0x66/0xa0
[14576.147837]  ? kmem_cache_free_bulk+0x2e1/0x450
[14576.147846]  ieee80211_tasklet_handler+0xbc/0xd0 [mac80211]
[14576.147848]  tasklet_action_common.isra.0+0x4a/0xb0
[14576.147850]  __do_softirq+0x114/0x332
[14576.147851]  irq_exit+0xd4/0xf0
[14576.147853]  do_IRQ+0xbb/0x130
[14576.147855]  common_interrupt+0xf/0xf
[14576.147855]  </IRQ>
[14576.147856] RIP: 0033:0x7f875c37bc23
[14576.147858] Code: 89 df ff 15 df 0b 24 00 85 c0 78 53 4c 8b 54 24 38 49 8b 42 38 48 85 c0 0f 85 f9 00 00 00 49 89 6a 28 48 83 c0 01 49 83 c7 01 <49> 89 42 38 4d 39 fc 75 aa 48 83 7c 24 08 00 74 0d 48 8b 44 24 28
[14576.147858] RSP: 002b:00007ffe369e9c20 EFLAGS: 00010202 ORIG_RAX: ffffffffffffffda
[14576.147859] RAX: 00000000000001ef RBX: 0000556fa6ff9890 RCX: 0000000000000000
[14576.147860] RDX: 0000000000000006 RSI: 00007f875c4b43fc RDI: 00007f87585160f0
[14576.147860] RBP: 000000000150d740 R08: 0000000000001608 R09: 0000556fa6ff8350
[14576.147861] R10: 00007f875a305a20 R11: 00000000000038f0 R12: 0000000000000009
[14576.147862] R13: 00007f8759bae740 R14: 00007ffe369e9c58 R15: 0000000000000007
[14576.147863] ---[ end trace 6c01ee4ff02c47b7 ]---
[14576.147981] ------------[ cut here ]------------
[14576.148004] WARNING: CPU: 1 PID: 272 at net/mac80211/rx.c:804 ieee80211_rx_napi.cold+0xc/0x67 [mac80211]
[14576.148004] Modules linked in: rt2800usb rt2x00usb rt2800lib rt2x00lib ath9k_htc ath9k_common ath9k_hw ath mt76x0u mt76x0_common mt76x02_usb mt76_usb mt76x02_lib mt76 ccm fuse nls_iso8859_1 nls_cp437 vfat fat nvidia_drm(POE) nvidia_modeset(POE) nvidia(POE) uvcvideo videobuf2_vmalloc videobuf2_memops snd_soc_skl videobuf2_v4l2 snd_soc_hdac_hda videobuf2_common snd_hda_ext_core videodev snd_soc_skl_ipc snd_soc_sst_ipc snd_soc_sst_dsp mc snd_soc_acpi_intel_match snd_soc_acpi snd_hda_codec_hdmi snd_hda_codec_realtek rtsx_usb_ms rtl8821ae snd_soc_core snd_compress ac97_bus snd_pcm_dmaengine snd_hda_codec_generic memstick ledtrig_audio r8169 x86_pkg_temp_thermal intel_powerclamp coretemp btcoexist rtl_pci joydev kvm_intel rtlwifi realtek mousedev i915 libphy btusb btrtl btbcm btintel kvm mac80211 ipmi_devintf bluetooth ipmi_msghandler i2c_algo_bit irqbypass snd_hda_intel drm_kms_helper snd_hda_codec drm cfg80211 crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_hda_core asus_nb_wmi asus_wmi
[14576.148018]  aesni_intel intel_gtt libarc4 snd_hwdep intel_rapl_msr agpgart snd_pcm aes_x86_64 crypto_simd mei_hdcp syscopyarea cryptd sparse_keymap i2c_hid ecdh_generic sysfillrect glue_helper iTCO_wdt sysimgblt rfkill iTCO_vendor_support fb_sys_fops intel_cstate intel_uncore ecc intel_rapl_perf mxm_wmi snd_timer snd intel_xhci_usb_role_switch input_leds pcspkr soundcore roles elan_i2c tpm_crb evdev processor_thermal_device tpm_tis intel_rapl_common tpm_tis_core mei_me int3403_thermal tpm int340x_thermal_zone mac_hid i2c_i801 mei rng_core intel_soc_dts_iosf intel_pch_thermal idma64 intel_lpss_pci intel_lpss int3400_thermal acpi_thermal_rel wmi asus_wireless ac battery sg crypto_user ip_tables x_tables ext4 crc32c_generic crc16 mbcache jbd2 rtsx_usb_sdmmc mmc_core rtsx_usb hid_generic usbhid hid sr_mod cdrom sd_mod ahci serio_raw libahci atkbd libps2 libata xhci_pci crc32c_intel scsi_mod xhci_hcd i8042 serio
[14576.148034] CPU: 1 PID: 272 Comm: systemd-journal Tainted: P        W  OE     5.3.8-arch1-1 #1
[14576.148034] Hardware name: ASUSTeK COMPUTER INC. X555UB/X555UB, BIOS X555UB.301 02/20/2017
[14576.148047] RIP: 0010:ieee80211_rx_napi.cold+0xc/0x67 [mac80211]
[14576.148049] Code: 38 48 81 c1 70 04 00 00 48 81 c6 38 01 00 00 e8 0a 40 8e f1 b8 01 00 00 00 e9 26 4b fb ff 48 c7 c7 60 7b 94 c0 e8 b7 53 3c f1 <0f> 0b 48 89 ef e8 7f 28 a1 f1 e9 d1 5b fb ff 48 c7 c7 60 7b 94 c0
[14576.148049] RSP: 0018:ffffab7a00120e10 EFLAGS: 00010246
[14576.148050] RAX: 0000000000000024 RBX: ffff9656387207a0 RCX: 0000000000000000
[14576.148051] RDX: 0000000000000000 RSI: 0000000000000086 RDI: 00000000ffffffff
[14576.148051] RBP: ffff9655c18b8f00 R08: 0000000000000d91 R09: 0000000000000001
[14576.148052] R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000
[14576.148052] R13: 0000000000000001 R14: 0000000000000006 R15: 0000000000000000
[14576.148053] FS:  00007f875aea1840(0000) GS:ffff96563ba80000(0000) knlGS:0000000000000000
[14576.148054] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[14576.148055] CR2: 00007f875a045e10 CR3: 0000000276ed8003 CR4: 00000000003606e0
[14576.148055] Call Trace:
[14576.148056]  <IRQ>
[14576.148058]  ? __mod_zone_page_state+0x66/0xa0
[14576.148060]  ? kmem_cache_free_bulk+0x2e1/0x450
[14576.148070]  ieee80211_tasklet_handler+0xbc/0xd0 [mac80211]
[14576.148071]  tasklet_action_common.isra.0+0x4a/0xb0
[14576.148073]  __do_softirq+0x114/0x332
[14576.148074]  irq_exit+0xd4/0xf0
[14576.148075]  do_IRQ+0xbb/0x130
[14576.148077]  common_interrupt+0xf/0xf
[14576.148078]  </IRQ>
[14576.148080] RIP: 0010:devkmsg_poll+0x6f/0xa0
[14576.148081] Code: 80 00 49 8b 04 24 45 31 e4 48 3b 05 6b a0 7d 01 72 1e 48 c7 c7 0c 06 4b b3 e8 8d ab 80 00 e8 e8 3d 00 00 fb 66 0f 1f 44 00 00 <44> 89 e0 41 5c c3 48 3b 05 54 a0 7d 01 45 19 e4 41 83 e4 0a 41 83
[14576.148082] RSP: 0018:ffffab7a002a7d40 EFLAGS: 00000246 ORIG_RAX: ffffffffffffffda
[14576.148083] RAX: 0000000080000000 RBX: ffff965636f9e870 RCX: 0000000000000000
[14576.148083] RDX: 0000000000000001 RSI: ffffab7a002a7d88 RDI: 00000000ffffffff
[14576.148084] RBP: ffffab7a002a7d88 R08: 0000000000000000 R09: 0000000000000000
[14576.148084] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000041
[14576.148085] R13: ffffab7a002a7de0 R14: ffffab7a002a7dc8 R15: ffffab7a002a7e78
[14576.148088]  ep_item_poll.isra.0+0x3f/0xb0
[14576.148090]  ep_send_events_proc+0xeb/0x1f0
[14576.148092]  ? balance_dirty_pages_ratelimited+0x102/0x4c0
[14576.148093]  ? ep_read_events_proc+0xe0/0xe0
[14576.148095]  ep_scan_ready_list.constprop.0+0xa3/0x1f0
[14576.148097]  ep_poll+0x118/0x4b0
[14576.148099]  do_epoll_wait+0xb0/0xd0
[14576.148100]  __x64_sys_epoll_wait+0x1a/0x20
[14576.148102]  do_syscall_64+0x5f/0x1c0
[14576.148104]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[14576.148105] RIP: 0033:0x7f875c6bf60e
[14576.148106] Code: 10 89 7c 24 0c 89 4c 24 1c e8 2e 65 f8 ff 44 8b 54 24 1c 8b 54 24 18 41 89 c0 48 8b 74 24 10 8b 7c 24 0c b8 e8 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 2c 44 89 c7 89 44 24 0c e8 5e 65 f8 ff 8b 44
[14576.148107] RSP: 002b:00007ffe369ec500 EFLAGS: 00000293 ORIG_RAX: 00000000000000e8
[14576.148108] RAX: ffffffffffffffda RBX: 0000556fa6ff3d90 RCX: 00007f875c6bf60e
[14576.148108] RDX: 0000000000000030 RSI: 00007ffe369ec530 RDI: 0000000000000008
[14576.148109] RBP: 00007ffe369ec870 R08: 0000000000000000 R09: 0000000000000030
[14576.148109] R10: 00000000ffffffff R11: 0000000000000293 R12: 00007ffe369ec530
[14576.148110] R13: ffffffffffffffff R14: 0000000000000000 R15: 0000000000000001
[14576.148111] ---[ end trace 6c01ee4ff02c47b8 ]---
[14577.298535] usb 1-1: USB disconnect, device number 21
[14577.299850] xhci_hcd 0000:00:14.0: WARN Cannot submit Set TR Deq Ptr
[14577.299857] xhci_hcd 0000:00:14.0: A Set TR Deq Ptr command is pending.
[14577.425685] audit: type=1130 audit(1573227676.997:143): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'


If we assume the driver is ok (we can do this, because it happens on different drivers) the cause must be located within xhci (USB host).
Comment 98 Bernhard 2019-11-08 16:09:18 UTC
(In reply to Michael from comment #96)
> I can try to bisect to identify the patch, but that will take a while.

Tbh I would try reverting the commit that caused the problem for me first, just to make sure you're not spending multiple hours bisecting this issue and then find out that you're affected by the same commit.
Comment 99 Michael 2019-11-08 16:40:52 UTC
Bernhard, that will be great. I'm not at home and my ASUS notebook is really too slow to perform a bisect.
Comment 100 Michael 2019-11-09 10:57:02 UTC
@Bernhard, @Mathias
I'm not sure anymore if the issue is related to xhci, because of the lates WARNINGs and traces.
I tested a PCIe card
Network controller: Realtek Semiconductor Co., Ltd. RTL8821AE 802.11ac PCIe Wireless Network Adapter
and running into similar issues:
12506.901197] wlp3s0: deauthenticating from 00:24:d4:9e:e8:c4 by local choice (Reason: 3=DEAUTH_LEAVING)
[12506.902535] ------------[ cut here ]------------
[12506.902589] WARNING: CPU: 1 PID: 15941 at net/mac80211/rx.c:804 ieee80211_rx_napi.cold+0xc/0x67 [mac80211]
[12506.902590] Modules linked in: nfnetlink_queue nfnetlink_log nfnetlink mt7601u ccm fuse nls_iso8859_1 nls_cp437 vfat fat nvidia_drm(POE) nvidia_modeset(POE) nvidia(POE) uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_common videodev mc snd_soc_skl snd_soc_hdac_hda snd_hda_ext_core snd_soc_skl_ipc snd_soc_sst_ipc rtsx_usb_ms snd_soc_sst_dsp rtl8821ae snd_soc_acpi_intel_match x86_pkg_temp_thermal memstick snd_soc_acpi intel_powerclamp btcoexist coretemp r8169 kvm_intel snd_soc_core rtl_pci rtlwifi snd_hda_codec_hdmi snd_compress ac97_bus kvm mac80211 snd_hda_codec_realtek ipmi_devintf ipmi_msghandler snd_pcm_dmaengine snd_hda_codec_generic irqbypass ledtrig_audio cfg80211 realtek libphy joydev mousedev iTCO_wdt i915 iTCO_vendor_support crct10dif_pclmul crc32_pclmul libarc4 ghash_clmulni_intel btusb btrtl aesni_intel btbcm btintel bluetooth aes_x86_64 snd_hda_intel snd_hda_codec crypto_simd cryptd i2c_algo_bit i2c_hid glue_helper drm_kms_helper asus_nb_wmi intel_rapl_msr
[12506.902624]  asus_wmi drm sparse_keymap mei_hdcp snd_hda_core intel_cstate mxm_wmi intel_uncore intel_rapl_perf intel_gtt agpgart ecdh_generic snd_hwdep pcspkr rfkill syscopyarea snd_pcm sysfillrect ecc sysimgblt fb_sys_fops tpm_crb input_leds snd_timer elan_i2c tpm_tis tpm_tis_core snd int3403_thermal tpm i2c_i801 evdev rng_core soundcore processor_thermal_device intel_rapl_common mac_hid idma64 intel_xhci_usb_role_switch int340x_thermal_zone roles intel_soc_dts_iosf mei_me int3400_thermal mei acpi_thermal_rel intel_pch_thermal intel_lpss_pci intel_lpss asus_wireless wmi battery ac sg crypto_user ip_tables x_tables ext4 crc32c_generic crc16 mbcache jbd2 rtsx_usb_sdmmc mmc_core rtsx_usb hid_generic usbhid hid sr_mod cdrom sd_mod serio_raw atkbd libps2 ahci libahci libata xhci_pci crc32c_intel i8042 xhci_hcd scsi_mod serio
[12506.902660] CPU: 1 PID: 15941 Comm: Netlink Monitor Tainted: P        W  OE     5.3.8-arch1-1 #1
[12506.902661] Hardware name: ASUSTeK COMPUTER INC. X555UB/X555UB, BIOS X555UB.301 02/20/2017
[12506.902684] RIP: 0010:ieee80211_rx_napi.cold+0xc/0x67 [mac80211]
[12506.902687] Code: 38 48 81 c1 70 04 00 00 48 81 c6 38 01 00 00 e8 0a 10 77 dc b8 01 00 00 00 e9 26 4b fb ff 48 c7 c7 60 ab eb c0 e8 b7 23 25 dc <0f> 0b 48 89 ef e8 7f f8 89 dc e9 d1 5b fb ff 48 c7 c7 60 ab eb c0
[12506.902688] RSP: 0000:ffffb624c0120e10 EFLAGS: 00010246
[12506.902690] RAX: 0000000000000024 RBX: ffff8ee22cae07a0 RCX: 0000000000000000
[12506.902691] RDX: 0000000000000000 RSI: ffff8ee23ba97708 RDI: 00000000ffffffff
[12506.902692] RBP: ffff8ee1ab8b8400 R08: 00000000000014eb R09: 0000000000000001
[12506.902692] R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000
[12506.902694] R13: 0000000000000001 R14: 0000000000000006 R15: 0000000000000000
[12506.902695] FS:  00007f27b8866700(0000) GS:ffff8ee23ba80000(0000) knlGS:0000000000000000
[12506.902696] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[12506.902697] CR2: 00005599e0bfe008 CR3: 00000002417b6002 CR4: 00000000003606e0
[12506.902699] Call Trace:
[12506.902702]  <IRQ>
[12506.902707]  ? __mod_zone_page_state+0x66/0xa0
[12506.902712]  ? kmem_cache_free_bulk+0x2e1/0x450
[12506.902730]  ieee80211_tasklet_handler+0xbc/0xd0 [mac80211]
[12506.902734]  tasklet_action_common.isra.0+0x4a/0xb0
[12506.902737]  __do_softirq+0x114/0x332
[12506.902740]  irq_exit+0xd4/0xf0
[12506.902742]  do_IRQ+0xbb/0x130
[12506.902746]  common_interrupt+0xf/0xf
[12506.902747]  </IRQ>
[12506.902749] RIP: 0033:0x55b7f9be923d
[12506.902751] Code: 0f 84 9e 00 00 00 48 8b 10 48 83 e2 fe 48 09 ca 48 89 56 08 48 89 30 48 8b 4e 08 48 83 e1 fe 74 09 48 8b 51 08 f6 c2 01 75 06 <48> 89 4e 08 59 c3 48 83 e2 fe 48 89 51 08 48 8b 4e 08 48 89 ca 48
[12506.902752] RSP: 002b:00007f27b8864a10 EFLAGS: 00000246 ORIG_RAX: ffffffffffffffda
[12506.902754] RAX: 00007f27a6800770 RBX: 00007f27a6201628 RCX: 0000000000000000
[12506.902755] RDX: 0000000000000001 RSI: 00007f27a6201628 RDI: 0000000000000000
[12506.902755] RBP: 0000000000000000 R08: 0000000000000000 R09: 00007f27c3f0a3b6
[12506.902756] R10: 0000000000000000 R11: 0000000000000000 R12: 00007f27c8e00110
[12506.902757] R13: 00007f27a6800f80 R14: 00000000ffffffff R15: 00007f27a5d01100
[12506.902760] ---[ end trace 934096102c096064 ]---
[12506.990611] audit: type=1131 audit(1573296338.199:239): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=wpa_supplicant comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[12507.259354] ------------[ cut here ]------------
[12507.259405] WARNING: CPU: 1 PID: 16380 at net/mac80211/rx.c:804 ieee80211_rx_napi.cold+0xc/0x67 [mac80211]
[12507.259406] Modules linked in: nfnetlink_queue nfnetlink_log nfnetlink mt7601u ccm fuse nls_iso8859_1 nls_cp437 vfat fat nvidia_drm(POE) nvidia_modeset(POE) nvidia(POE) uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_common videodev mc snd_soc_skl snd_soc_hdac_hda snd_hda_ext_core snd_soc_skl_ipc snd_soc_sst_ipc rtsx_usb_ms snd_soc_sst_dsp rtl8821ae snd_soc_acpi_intel_match x86_pkg_temp_thermal memstick snd_soc_acpi intel_powerclamp btcoexist coretemp r8169 kvm_intel snd_soc_core rtl_pci rtlwifi snd_hda_codec_hdmi snd_compress ac97_bus kvm mac80211 snd_hda_codec_realtek ipmi_devintf ipmi_msghandler snd_pcm_dmaengine snd_hda_codec_generic irqbypass ledtrig_audio cfg80211 realtek libphy joydev mousedev iTCO_wdt i915 iTCO_vendor_support crct10dif_pclmul crc32_pclmul libarc4 ghash_clmulni_intel btusb btrtl aesni_intel btbcm btintel bluetooth aes_x86_64 snd_hda_intel snd_hda_codec crypto_simd cryptd i2c_algo_bit i2c_hid glue_helper drm_kms_helper asus_nb_wmi intel_rapl_msr
[12507.259436]  asus_wmi drm sparse_keymap mei_hdcp snd_hda_core intel_cstate mxm_wmi intel_uncore intel_rapl_perf intel_gtt agpgart ecdh_generic snd_hwdep pcspkr rfkill syscopyarea snd_pcm sysfillrect ecc sysimgblt fb_sys_fops tpm_crb input_leds snd_timer elan_i2c tpm_tis tpm_tis_core snd int3403_thermal tpm i2c_i801 evdev rng_core soundcore processor_thermal_device intel_rapl_common mac_hid idma64 intel_xhci_usb_role_switch int340x_thermal_zone roles intel_soc_dts_iosf mei_me int3400_thermal mei acpi_thermal_rel intel_pch_thermal intel_lpss_pci intel_lpss asus_wireless wmi battery ac sg crypto_user ip_tables x_tables ext4 crc32c_generic crc16 mbcache jbd2 rtsx_usb_sdmmc mmc_core rtsx_usb hid_generic usbhid hid sr_mod cdrom sd_mod serio_raw atkbd libps2 ahci libahci libata xhci_pci crc32c_intel i8042 xhci_hcd scsi_mod serio
[12507.259466] CPU: 1 PID: 16380 Comm: sudo Tainted: P        W  OE     5.3.8-arch1-1 #1
[12507.259466] Hardware name: ASUSTeK COMPUTER INC. X555UB/X555UB, BIOS X555UB.301 02/20/2017
[12507.259483] RIP: 0010:ieee80211_rx_napi.cold+0xc/0x67 [mac80211]
[12507.259485] Code: 38 48 81 c1 70 04 00 00 48 81 c6 38 01 00 00 e8 0a 10 77 dc b8 01 00 00 00 e9 26 4b fb ff 48 c7 c7 60 ab eb c0 e8 b7 23 25 dc <0f> 0b 48 89 ef e8 7f f8 89 dc e9 d1 5b fb ff 48 c7 c7 60 ab eb c0
[12507.259485] RSP: 0000:ffffb624c0120e10 EFLAGS: 00010246
[12507.259486] RAX: 0000000000000024 RBX: ffff8ee22cae07a0 RCX: 0000000000000000
[12507.259487] RDX: 0000000000000000 RSI: ffff8ee23ba97708 RDI: 00000000ffffffff
[12507.259488] RBP: ffff8ee1ab8b8b00 R08: 0000000000001511 R09: 0000000000000001
[12507.259488] R10: 0000000000000000 R11: 0000000000000001 R12: 0000000000000000
[12507.259489] R13: 0000000000000001 R14: 0000000000000006 R15: 0000000000000000
[12507.259490] FS:  00007fe70c78b740(0000) GS:ffff8ee23ba80000(0000) knlGS:0000000000000000
[12507.259491] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[12507.259491] CR2: 00007fe70ca9c1b0 CR3: 00000001f9502001 CR4: 00000000003606e0
[12507.259492] Call Trace:
[12507.259494]  <IRQ>
[12507.259499]  ? __mod_zone_page_state+0x66/0xa0
[12507.259502]  ? kmem_cache_free_bulk+0x2e1/0x450
[12507.259512]  ieee80211_tasklet_handler+0xbc/0xd0 [mac80211]
[12507.259515]  tasklet_action_common.isra.0+0x4a/0xb0
[12507.259517]  __do_softirq+0x114/0x332
[12507.259519]  irq_exit+0xd4/0xf0
[12507.259521]  do_IRQ+0xbb/0x130
[12507.259524]  common_interrupt+0xf/0xf
[12507.259524]  </IRQ>
[12507.259527] RIP: 0010:__do_page_fault+0x12c/0x4f0
[12507.259528] Code: a9 ff ff ff 7f 0f 85 cf 01 00 00 48 85 db 0f 84 c6 01 00 00 41 f6 84 24 88 00 00 00 03 0f 84 4a 01 00 00 fb 66 0f 1f 44 00 00 <41> bf 54 00 00 00 0f 1f 44 00 00 44 89 f8 48 89 e9 83 c8 01 83 e1
[12507.259529] RSP: 0000:ffffb624c4a2fec8 EFLAGS: 00000206 ORIG_RAX: ffffffffffffffda
[12507.259530] RAX: 0000000080000000 RBX: ffff8ee21a601980 RCX: 0000000000000000
[12507.259530] RDX: 00007fe70ca9c1b0 RSI: 0000000000000000 RDI: ffffb624c4a2ff58
[12507.259531] RBP: 0000000000000007 R08: 0000000000000000 R09: 0000000000000000
[12507.259531] R10: 0000000000000000 R11: 0000000000000000 R12: ffffb624c4a2ff58
[12507.259532] R13: 00007fe70ca9c1b0 R14: 00007fe70ca9c000 R15: 0000000000000000
[12507.259535]  do_page_fault+0x31/0x130
[12507.259536]  page_fault+0x3e/0x50
[12507.259538] RIP: 0033:0x7fe70c9a190d
[12507.259539] Code: 64 48 8b 04 25 28 00 00 00 48 89 44 24 38 31 c0 8b 05 b7 a8 0f 00 85 c0 0f 8e af 02 00 00 83 c0 01 83 f8 64 0f 8f 53 01 00 00 <89> 05 9d a8 0f 00 80 3d 16 87 0f 00 00 0f 84 a3 02 00 00 48 8b 05
[12507.259540] RSP: 002b:00007ffc8325d380 EFLAGS: 00010287
[12507.259540] RAX: 000000000000000a RBX: 000055b4c6e1fc80 RCX: 0000000000000400
[12507.259541] RDX: 000055b4c6e1fcb0 RSI: 000055b4c6e1fc80 RDI: 000055b4c6e15740
[12507.259541] RBP: 0000000000000400 R08: 00007ffc8325d418 R09: 0000000000000041
[12507.259542] R10: 0000000000000000 R11: 00007fe70ca96a40 R12: 000055b4c6e1fc80
[12507.259543] R13: 000055b4c6e15740 R14: 000055b4c6e1fcb0 R15: 0000000000000000
[12507.259544] ---[ end trace 934096102c096065 ]---
[12507.907345] IPv6: ADDRCONF(NETDEV_CHANGE): wlp3s0: link becomes ready
[12516.922094] audit: type=1131 audit(1573296348.129:240): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'

And we have a simliar bug report regarding an ATHEROS driver, here:
https://bugzilla.kernel.org/show_bug.cgi?id=198701

So if it is really a driver issue and not related to xhci, we have this issue on rt2800usb, mt76 and ath9k_htc.
Comment 101 Michael 2019-11-13 10:33:24 UTC
Here is a new log (dmesg and trace):
https://www.sendspace.com/file/hy2puw

Device: ALFA AWUS036NH
ID 148f:3070 Ralink Technology, Corp. RT2870/RT3070 Wireless Adapter

The device is connected and entered promiscuous mode
[76538.089897] xhci_hcd 0000:03:00.0: Waiting for status stage event
[76541.048223] xhci_hcd 0000:03:00.0: Transfer error for slot 23 ep 2 on endpoint
[76541.048233] xhci_hcd 0000:03:00.0: // Ding dong!
[76541.048356] xhci_hcd 0000:03:00.0: Ignoring reset ep completion code of 1
[76542.194353] device wlp3s0f0u2 entered promiscuous mode
...
we do not receive data via AF_PACKET socket.
...
[76542.194385] audit: type=1700 audit(1573639400.432:141): dev=wlp3s0f0u2 prom=256 old_prom=0 auid=1000 uid=0 gid=0 ses=2
[76554.680919] xhci_hcd 0000:03:00.0: Cancel URB 00000000e8c9ee79, dev 2, ep 0x81, starting at offset 0xff05d000
[76554.680929] xhci_hcd 0000:03:00.0: // Ding dong!

I can't find anything that caused it, except of the transfer error at 76541.048223.

If we connect the device to an USB2 port, everything is fine:
https://www.sendspace.com/file/azoa4a
we receive data via AF_PACKET socket.
The device is working as expected.
Comment 102 Michael 2019-12-04 08:14:03 UTC
Still present in kernel 5.4:
https://github.com/ZerBea/hcxdumptool/issues/80#issuecomment-561525525
Comment 103 Michael 2020-02-08 10:46:48 UTC
Still present running

$ uname -r
5.5.2-arch1-1

[16300.890097] mt76x0u 5-3.1.2:1.0: ASIC revision: 76100002 MAC revision: 76502000
[16301.239555] mt76x0u 5-3.1.2:1.0: EEPROM ver:02 fae:01
[16301.578393] ieee80211 phy6: Selected rate control algorithm 'minstrel_ht'
[16301.595805] mt76x0u 5-3.1.2:1.0 wlp39s0f3u3u1u2: renamed from wlan0
[16316.881303] device wlp39s0f3u3u1u2 entered promiscuous mode
[16316.881347] audit: type=1700 audit(1581158632.980:189): dev=wlp39s0f3u3u1u2 prom=256 old_prom=0 auid=1000 uid=0 gid=0 ses=2
[16316.882150] mt76x0u 5-3.1.2:1.0: tx urb failed: -71
[16316.882187] mt76u_complete_rx: 1989 callbacks suppressed
[16316.882190] mt76x0u 5-3.1.2:1.0: rx urb failed: -71
[16316.882227] mt76x0u 5-3.1.2:1.0: tx urb failed: -71
[16316.882267] mt76x0u 5-3.1.2:1.0: rx urb failed: -71
[16316.882346] mt76x0u 5-3.1.2:1.0: rx urb failed: -71
[16316.882426] mt76x0u 5-3.1.2:1.0: rx urb failed: -71
[16316.882505] mt76x0u 5-3.1.2:1.0: rx urb failed: -71
[16316.882586] mt76x0u 5-3.1.2:1.0: rx urb failed: -71
[16316.882666] mt76x0u 5-3.1.2:1.0: rx urb failed: -71
[16316.882745] mt76x0u 5-3.1.2:1.0: rx urb failed: -71
[16316.882825] mt76x0u 5-3.1.2:1.0: rx urb failed: -71
[16316.882905] mt76x0u 5-3.1.2:1.0: rx urb failed: -71
[16316.911559] usb 5-3.1.2: USB disconnect, device number 8
[16316.911980] xhci_hcd 0000:27:00.3: WARN Cannot submit Set TR Deq Ptr
[16316.911982] xhci_hcd 0000:27:00.3: A Set TR Deq Ptr command is pending.
[16316.921294] mt76x0u 5-3.1.2:1.0: mac specific condition occurred
[16316.948240] device wlp39s0f3u3u1u2 left promiscuous mode
Comment 104 Michael 2020-02-08 11:06:05 UTC
From now on this USB port is unusable.
E.g. connecting an USB memory stick to the same USB port
ID 13fe:6300 Kingston Technology Company Inc. USB DISK 3.0

spams dmesg log:
[16924.494936] usb 1-2: device descriptor read/8, error -71
[16924.625947] usb 1-2: device descriptor read/8, error -71
[16925.060354] usb 1-2: new high-speed USB device number 10 using xhci_hcd
[16925.339024] usb 1-2: device descriptor read/8, error -71
[16925.439343] usb usb2-port2: config error
[16925.469057] usb 1-2: device descriptor read/8, error -71
[16925.573848] usb usb1-port2: attempt power cycle
[16926.217012] usb 1-2: new high-speed USB device number 11 using xhci_hcd
[16926.890380] usb 1-2: device descriptor read/64, error -71
[16927.837037] usb 1-2: device descriptor read/64, error -71
[16928.067117] usb 1-2: new high-speed USB device number 12 using xhci_hcd
[16928.390350] usb usb2-port2: config error
[16928.783690] usb 1-2: device descriptor read/64, error -71
[16929.730336] usb 1-2: device descriptor read/64, error -71


I noticed this behavior only on AMD RYZEN systems.
Comment 105 Michael 2020-02-13 14:22:17 UTC
A Garmin eTrex 30 connected to an USB 3.0 port of an AMD RYZEN system showing the same behavior:
[23803.507473] usb 1-2: new high-speed USB device number 14 using xhci_hcd
[23803.547562] usb 1-2: New USB device found, idVendor=05e3, idProduct=0727, bcdDevice= 2.50
[23803.547566] usb 1-2: New USB device strings: Mfr=3, Product=4, SerialNumber=2
[23803.547568] usb 1-2: Product: USB Storage
[23803.547570] usb 1-2: Manufacturer: Generic
[23803.547572] usb 1-2: SerialNumber: 000000000250
[23803.554609] usb-storage 1-2:1.0: USB Mass Storage device detected
[23803.554796] scsi host9: usb-storage 1-2:1.0
[23804.580523] scsi 9:0:0:0: Direct-Access     Generic  STORAGE DEVICE   0250 PQ: 0 ANSI: 0
[23804.580860] sd 9:0:0:0: Attached scsi generic sg2 type 0
[23804.818580] sd 9:0:0:0: [sdb] 30392320 512-byte logical blocks: (15.6 GB/14.5 GiB)
[23804.820914] sd 9:0:0:0: [sdb] Write Protect is off
[23804.820918] sd 9:0:0:0: [sdb] Mode Sense: 0b 00 00 08
[23804.822987] sd 9:0:0:0: [sdb] No Caching mode page found
[23804.822991] sd 9:0:0:0: [sdb] Assuming drive cache: write through
[23804.849969]  sdb: sdb1
[23804.854844] sd 9:0:0:0: [sdb] Attached SCSI removable disk
[24257.645365] usb 1-1: new full-speed USB device number 15 using xhci_hcd
[24257.862068] usb 1-1: device descriptor read/64, error -71


Connected to an USB 2.0 port or to an INTEL system (using the same cable!), everything is fine.
Comment 106 Andreas 2020-02-22 12:28:06 UTC
Hello,
I found this bug by google search when looking for the error message. I have a quite similar behaviour when trying to clear a IDE disk by writing urandom data to it. I'm using a usb<->IDE converter. It's working quite fine when using one of the USB2.0 ports but fails with upper error message in most USB3.1 Port scenarios.

System:
Vanilla Kernel 5.4.21 (Debian bullseye configuration)
Ryzen 7 1800X
Gigabyte AX370 Gaming 5
 - X370 Series Chipset USB 3.1 xHCI Controller (rev 02)
 - ASMedia Technology Inc. ASM1143 USB 3.1 Host Controller (doesn't work at all)
 - Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) USB 3.0 Host Controller

The issue seems to have some sort of "cable" component as I do get scenarios which seem to work even on USB3.0 Ports, I'll just write what I observed.

Case 1 USB 3.1:
USB<->SATA device -> USB3.1 Port -> worked at least once

Case 2 USB 3.1:
USB<->SATA device -> 4-Port USB hub (10cm cable) -> worked at least once

Case 3 USB 3.1:
USB<->SATA device -> 4-Port USB hub (40cm cable) -> USB 3.1 Port --> never managed to clean disk

Case 4 USB 3.1: 
USB<->SATA device -> 2m usb cable -> USB 3.1 Port --> never managed to clean disk

case 5 USB 2.0:
USB<->SATA devive -> USB 2.0 Port -> works

case 6 USB 2.0:
USB<->SATA device -> 4-Port USB hub (10cm cable) -> USB 2.0 Port -> works

case 7 USB 2.0:
USB<->SATA device -> 4-Port USB hub (40cm cable) -> USB 2.0 Port -> works

case 8 USB 2.0:
USB<->SATA device -> 2m cable -> USB 2.0 Port -> works

case 9 USB 2.0:
USB<->SATA device -> 2m cable 4-Port USB hub (40cm cable) -> USB 2.0 Port -> works

All tested USB hubs are 2.0 hubs. The asmedia usb doesn't work at all port is dead right after booting, yet this seems to be unrelated to this issue here.

To me this does look like the 3.1 Ports are extremely sensitive to cable issues.
Comment 107 biopsin 2020-03-18 11:35:51 UTC
5.4.25_1 - ROG STRIX B450-I GAMING (RYZEN)

Hi,
bug is still present with external HDD conectected on DELTACO USB3.0 TO SATAII + 3.5*IDE Cable.


dmesg output:

[ 9540.086599] usb 2-3: device descriptor read/8, error -110
[ 9545.717826] usb 2-3: device descriptor read/8, error -110
[ 9551.350614] usb 2-3: device descriptor read/8, error -110
[ 9556.982468] usb 2-3: device descriptor read/8, error -110
[ 9562.614549] usb 2-3: device descriptor read/8, error -110
[ 9568.246248] usb 2-3: device descriptor read/8, error -110
[ 9573.878494] usb 2-3: device descriptor read/8, error -110
[ 9579.510536] usb 2-3: device descriptor read/8, error -110
[ 9579.658663] blk_update_request: I/O error, dev sdc, sector 319807200 op 0x0:(READ) flags 0x80700 phys_seg 2 prio class 0
[ 9579.658779] blk_update_request: I/O error, dev sdc, sector 319807456 op 0x0:(READ) flags 0x80700 phys_seg 2 prio class 0
[ 9579.658809] blk_update_request: I/O error, dev sdc, sector 319807200 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[ 9579.658842] blk_update_request: I/O error, dev sdc, sector 2048 op 0x1:(WRITE) flags 0x100000 phys_seg
1 prio class 0
[ 9579.658846] Buffer I/O error on dev sdc1, logical block 0, lost async page write
[ 9580.671946] EXT4-fs error (device sdc1): __ext4_find_entry:1531: inode #2: comm udevil: reading directory lblock 0
[ 9580.674408] EXT4-fs error (device sdc1): __ext4_find_entry:1531: inode #2: comm udevil: reading directory lblock 0
[ 9585.142455] usb 2-3: device descriptor read/8, error -110
[ 9590.773921] usb 2-3: device descriptor read/8, error -110
[ 9590.773935] xhci_hcd 0000:02:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
[ 9592.045019] Buffer I/O error on dev sdc1, logical block 30441472, lost sync page write
[ 9592.045023] JBD2: Error -5 detected when updating journal superblock for sdc1-8.
[ 9592.045025] Buffer I/O error on dev sdc1, logical block 30441472, lost sync page write
[ 9592.045026] JBD2: Error -5 detected when updating journal superblock for sdc1-8.
[ 9596.406564] usb 2-3: device descriptor read/8, error -110
Comment 108 ErickP 2020-03-25 02:03:30 UTC
Hello,

This bug is present on ARM64 SBC system too.

uname -r
5.4.26-rockchip64 (Ubuntu 18.04.4 LTS)

Device: Realtek Ethernet 8152 USB 3.0 Gigabit adapter

dmesg:
[11519.368679] xhci-hcd xhci-hcd.1.auto: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
[11519.997949] usb 8-1: reset SuperSpeed Gen 1 USB device number 2 using xhci-hcd
[11522.779552] xhci-hcd xhci-hcd.1.auto: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
[11523.389784] usb 8-1: reset SuperSpeed Gen 1 USB device number 2 using xhci-hcd
[11528.980290] xhci-hcd xhci-hcd.1.auto: xHCI host not responding to stop endpoint command.
[11528.993885] xhci-hcd xhci-hcd.1.auto: xHCI host controller not responding, assume dead
[11528.994627] xhci-hcd xhci-hcd.1.auto: HC died; cleaning up
Comment 109 Michael 2020-04-14 12:36:17 UTC
Just a small notice: bug is still alive running
$ uname -r
5.6.3-arch1-1

[21762.874883] usb 1-2: new high-speed USB device number 5 using xhci_hcd
[21762.928994] usb 1-2: New USB device found, idVendor=148f, idProduct=5370, bcdDevice= 1.01
[21762.928997] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[21762.929000] usb 1-2: Product: 802.11 n WLAN
[21762.929002] usb 1-2: Manufacturer: Ralink
[21762.929003] usb 1-2: SerialNumber: 1.0
[21763.223013] usb 1-2: reset high-speed USB device number 5 using xhci_hcd
[21763.266041] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 5390, rev 0502 detected
[21763.944109] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 5370 detected
[21763.950281] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[21763.950768] usbcore: registered new interface driver rt2800usb
[21763.962966] rt2800usb 1-2:1.0 wlp3s0f0u2: renamed from wlan0
[21807.879713] ieee80211 phy0: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[21807.879968] ieee80211 phy0: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.36
[21811.980951] device wlp3s0f0u2 entered promiscuous mode
[21831.708072] xhci_hcd 0000:03:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
[21831.813186] device wlp3s0f0u2 left promiscuous mode
Comment 110 Mathias Nyman 2020-04-14 13:07:24 UTC
Created attachment 288441 [details]
Patch v2 1/2  handling halted endpoints at completion of stop endpoint command

patch 1/2 of two patch series to fix this issue
Comment 111 Mathias Nyman 2020-04-14 13:08:32 UTC
Created attachment 288443 [details]
Patch v2 2/2  handling halted endpoints at completion of stop endpoint command

patch 2/2 of series to fix this issue
Comment 112 Michael 2020-04-14 13:47:22 UTC
Thanks for the patches. Added both of them and the issue is still present:

[   21.783543] usb 1-1: new high-speed USB device number 5 using xhci_hcd
[   21.837511] usb 1-1: New USB device found, idVendor=148f, idProduct=5370, bcdDevice= 1.01
[   21.837515] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   21.837518] usb 1-1: Product: 802.11 n WLAN
[   21.837520] usb 1-1: Manufacturer: Ralink
[   21.837522] usb 1-1: SerialNumber: 1.0
[   22.165094] usb 1-1: reset high-speed USB device number 5 using xhci_hcd
[   22.207584] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 5390, rev 0502 detected
[   22.886244] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 5370 detected
[   22.891860] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   22.892493] usbcore: registered new interface driver rt2800usb
[   22.904005] rt2800usb 1-1:1.0 wlp3s0f0u1: renamed from wlan0
[   43.634949] device wlp3s0f0u1 entered promiscuous mode
[   43.635031] audit: type=1700 audit(1586871720.135:70): dev=wlp3s0f0u1 prom=256 old_prom=0 auid=1000 uid=0 gid=0 ses=2
[   65.039630] xhci_hcd 0000:03:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
[   65.091107] device wlp3s0f0u1 left promiscuous mode
Comment 113 Michael 2020-04-14 13:48:05 UTC
ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter
Comment 114 Michael 2020-04-14 13:57:24 UTC
Not all devices are affected in the same way.
Same USB3 port and not affected:
ID 148f:3070 Ralink Technology, Corp. RT2870/RT3070 Wireless Adapter

[  765.080527] usb 1-1: new high-speed USB device number 7 using xhci_hcd
[  765.133195] usb 1-1: New USB device found, idVendor=148f, idProduct=3070, bcdDevice= 1.01
[  765.133199] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  765.133201] usb 1-1: Product: 802.11 n WLAN
[  765.133203] usb 1-1: Manufacturer: Ralink
[  765.133204] usb 1-1: SerialNumber: 1.0
[  765.345171] usb 1-1: reset high-speed USB device number 7 using xhci_hcd
[  765.388223] ieee80211 phy2: rt2x00_set_rt: Info - RT chipset 3070, rev 0201 detected
[  766.066341] ieee80211 phy2: rt2x00_set_rf: Info - RF chipset 0005 detected
[  766.072528] ieee80211 phy2: Selected rate control algorithm 'minstrel_ht'
[  766.091676] audit: type=1130 audit(1586872442.909:94): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[  766.097778] rt2800usb 1-1:1.0 wlp3s0f0u1: renamed from wlan0
[  771.664919] ieee80211 phy2: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[  771.664959] ieee80211 phy2: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.36
[  775.893631] device wlp3s0f0u1 entered promiscuous mode
[  775.893663] audit: type=1700 audit(1586872452.713:99): dev=wlp3s0f0u1 prom=256 old_prom=0 auid=1000 uid=0 gid=0 ses=2
[  777.876925] device wlp3s0f0u1 left promiscuous mode
Comment 115 Bernhard 2020-04-14 17:08:23 UTC
I just applied both patches, the Xhci Error message actually went away BUT the device still didn't work.

Logs after unplugging & plugging in the device with the patches:
[   72.648791] usb 1-4: USB disconnect, device number 3
[   72.650675] ieee80211 phy0: rt2x00usb_vendor_request: Error - Vendor Request 0x07 failed for offset 0x101c with error -19
[   72.753779] wlan0: deauthenticating from cc:ce:1e:99:77:ed by local choice (Reason: 3=DEAUTH_LEAVING)
[   72.781608] audit: type=1130 audit(1586883567.129:93): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[   72.793722] audit: type=1130 audit(1586883567.139:94): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[   73.317939] audit: type=1131 audit(1586883567.665:95): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=geoclue comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[   77.799300] audit: type=1131 audit(1586883572.149:96): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[   80.933744] usb 1-4: new high-speed USB device number 6 using xhci_hcd
[   80.988187] usb 1-4: New USB device found, idVendor=148f, idProduct=5370, bcdDevice= 1.01
[   80.988190] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   80.988191] usb 1-4: Product: 802.11 n WLAN
[   80.988192] usb 1-4: Manufacturer: Ralink
[   80.988193] usb 1-4: SerialNumber: 1.0
[   81.131897] usb 1-4: reset high-speed USB device number 6 using xhci_hcd
[   81.174210] ieee80211 phy1: rt2x00_set_rt: Info - RT chipset 5390, rev 0502 detected
[   81.852225] ieee80211 phy1: rt2x00_set_rf: Info - RF chipset 5370 detected
[   81.858386] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
[   81.920689] ieee80211 phy1: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[   81.920711] ieee80211 phy1: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.36

Compared to the output without patches:
[   67.093338] usb 1-4: USB disconnect, device number 3
[   67.093964] xhci_hcd 0000:15:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
[   67.096166] ieee80211 phy0: rt2x00usb_vendor_request: Error - Vendor Request 0x06 failed for offset 0x101c with error -19
[   67.168604] wlan0: deauthenticating from cc:ce:1e:99:77:ed by local choice (Reason: 3=DEAUTH_LEAVING)
[   67.179973] audit: type=1130 audit(1586883250.510:93): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[   67.231226] audit: type=1130 audit(1586883250.560:94): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[   72.236839] audit: type=1131 audit(1586883255.570:95): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-rfkill comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[   73.323295] audit: type=1131 audit(1586883256.653:96): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=geoclue comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[   77.327072] audit: type=1131 audit(1586883260.660:97): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=NetworkManager-dispatcher comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[   77.865232] usb 1-4: new high-speed USB device number 6 using xhci_hcd
[   77.919826] usb 1-4: New USB device found, idVendor=148f, idProduct=5370, bcdDevice= 1.01
[   77.919830] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   77.919832] usb 1-4: Product: 802.11 n WLAN
[   77.919833] usb 1-4: Manufacturer: Ralink
[   77.919835] usb 1-4: SerialNumber: 1.0
[   78.063383] usb 1-4: reset high-speed USB device number 6 using xhci_hcd
[   78.105846] ieee80211 phy1: rt2x00_set_rt: Info - RT chipset 5390, rev 0502 detected
[   78.783888] ieee80211 phy1: rt2x00_set_rf: Info - RF chipset 5370 detected
[   78.790016] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
[   78.874273] ieee80211 phy1: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[   78.874299] ieee80211 phy1: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.36

ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter
Comment 116 Michael 2020-04-15 06:27:39 UTC
Tested another device against the applied patches to make sure the issue isn't related to the combination rt2800usb - usb host:
ID 7392:7710 Edimax Technology Co., Ltd Edimax Wi-Fi

[   68.126337] usb 1-2: new high-speed USB device number 17 using xhci_hcd
[   68.181565] usb 1-2: New USB device found, idVendor=7392, idProduct=7710, bcdDevice= 0.00
[   68.181568] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   68.181571] usb 1-2: Product: Edimax Wi-Fi
[   68.181573] usb 1-2: Manufacturer: MediaTek
[   68.181575] usb 1-2: SerialNumber: 1.0
[   68.398420] usb 1-2: reset high-speed USB device number 17 using xhci_hcd
[   68.446602] mt7601u 1-2:1.0: ASIC revision: 76010001 MAC revision: 76010500
[   68.473662] mt7601u 1-2:1.0: Firmware Version: 0.1.00 Build: 7640 Build time: 201302052146____
[   69.461098] mt7601u 1-2:1.0: EEPROM ver:0d fae:00
[   69.472103] mt7601u 1-2:1.0: EEPROM country region 01 (channels 1-13)
[   70.152995] mt7601u 1-2:1.0: Warning: mt7601u_mcu_wait_resp retrying
[   70.472567] mt7601u 1-2:1.0: Warning: mt7601u_mcu_wait_resp retrying
[   70.792966] mt7601u 1-2:1.0: Warning: mt7601u_mcu_wait_resp retrying
[   71.112927] mt7601u 1-2:1.0: Warning: mt7601u_mcu_wait_resp retrying
[   71.432909] mt7601u 1-2:1.0: Warning: mt7601u_mcu_wait_resp retrying
[   71.432913] mt7601u 1-2:1.0: Error: mt7601u_mcu_wait_resp timed out
[   71.433388] xhci_hcd 0000:03:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
[   71.435442] xhci_hcd 0000:03:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
[   71.582930] mt7601u 1-2:1.0: Vendor request req:07 off:0080 failed:-71
[   71.729217] mt7601u 1-2:1.0: Vendor request req:02 off:0080 failed:-71


After the device is unplugged, dmesg log is spammed:
[  363.312561] mt7601u 1-2:1.0: Vendor request req:07 off:0730 failed:-71
[  363.479252] mt7601u 1-2:1.0: Vendor request req:07 off:0730 failed:-71
[  363.649243] mt7601u 1-2:1.0: Vendor request req:07 off:0730 failed:-71
...
[  380.069000] mt7601u 1-2:1.0: Vendor request req:02 off:0080 failed:-71
[  380.069055] mt7601u: probe of 1-2:1.0 failed with error -110
[  380.069272] usb 1-2: USB disconnect, device number 90


@Bernhard: I can confirm missing Error message on some devices, too. The devices are not working.
Comment 117 Michael 2020-06-01 17:18:28 UTC
Just got a new variant of that issue:
[39799.493322] usb usb1-port9: disabled by hub (EMI?), re-enabling...
[39799.493328] usb 1-9: USB disconnect, device number 5
[39799.833153] usb 1-9: new low-speed USB device number 6 using xhci_hcd
[39815.286287] usb 1-9: device descriptor read/64, error -110
[39826.307239] xhci_hcd 0000:03:00.0: ERROR Transfer event pointed to bad slot 4
[39826.307247] xhci_hcd 0000:03:00.0: @00000000dffed510 dff3d720 00000000 03000005 04038001
[39826.307267] xhci_hcd 0000:03:00.0: AMD-Vi: Event logged [IO_PAGE_FAULT domain=0x000f address=0x60 flags=0x0020]
[39826.307395] xhci_hcd 0000:03:00.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 0 comp_code 3
[39826.307399] xhci_hcd 0000:03:00.0: Looking for event-dma 00000000dfeff000 trb-start 00000000dfeff0f0 trb-end 00000000dfeff110 seg-start 00000000dfeff000 seg-end 00000000dfeffff0

Affected: CHERRY RS 6000 USB ON keyboard and Logitech RX1000 mouse stopped working - reboot required.

$ uname -r
5.6.15-arch1-1
Comment 118 Øyvind Stegard 2020-06-03 10:17:30 UTC
My Linux server just crashed rather hard with these errors:
juni 02 19:26:17 nori kernel: xhci_hcd 0000:04:00.0: WARN Cannot submit Set TR Deq Ptr
juni 02 19:26:17 nori kernel: xhci_hcd 0000:04:00.0: A Set TR Deq Ptr command is pending.
juni 02 19:26:17 nori kernel: usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd
juni 02 19:26:37 nori kernel: xhci_hcd 0000:04:00.0: WARN Cannot submit Set TR Deq Ptr
juni 02 19:26:37 nori kernel: xhci_hcd 0000:04:00.0: A Set TR Deq Ptr command is pending.
juni 02 19:26:37 nori kernel: usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd


Affected a USB3-connected hard-drive (Bus 004 Device 002: ID 059f:1057 LaCie, Ltd), which became unresponsive, and there were several hung processes blocked on I/O to the drive. The drive itself has zero logged SMART-errors, so it's likely not failing. Another USB2-connected drive also was affected, but not in an unrecoverable fashion, i.e. hung processes could be killed. The server has been stable for several years, but this one forced me to do a hard power-off, due to soft reboot not able to complete.

Running Ubuntu 18.04.4.
[    0.000000] Linux version 5.3.0-53-generic (buildd@lgw01-amd64-016) (gcc version 7.5.0 (Ubuntu 7.5.0-3ubuntu1~18.04)) #47~18.04.1-Ubuntu SMP Thu May 7 13:10:50 UTC 2020 (Ubuntu 5.3.0-53.47~18.04.1-generic 5.3.18)


With USB controller:
04:00.0 USB controller: ASMedia Technology Inc. ASM1042 SuperSpeed USB Host Controller (prog-if 30 [XHCI])
        Subsystem: Holco Enterprise Co, Ltd/Shuttle Computer ASM1042 SuperSpeed USB Host Controller
        Flags: bus master, fast devsel, latency 0, IRQ 18
        Memory at f7c00000 (64-bit, non-prefetchable) [size=32K]
        Capabilities: [50] MSI: Enable- Count=1/8 Maskable- 64bit+
        Capabilities: [68] MSI-X: Enable+ Count=8 Masked-
        Capabilities: [78] Power Management version 3
        Capabilities: [80] Express Legacy Endpoint, MSI 00
        Capabilities: [100] Virtual Channel
        Kernel driver in use: xhci_hcd
Comment 119 Michael 2020-06-07 09:16:23 UTC
definitely weak xHCI host system (at this time Logitech keyboard, connected to USB 3 port):

[ 9241.775664] usb 1-9: new low-speed USB device number 7 using xhci_hcd
[ 9242.327943] xhci_hcd 0000:03:00.0: ERROR unknown event type 2
[ 9246.875619] xhci_hcd 0000:03:00.0: ERROR mismatched command completion event
[ 9249.008917] xhci_hcd 0000:03:00.0: Timeout while waiting for setup device command
[ 9264.462045] xhci_hcd 0000:03:00.0: Abort failed to stop command ring: -110
[ 9264.462080] xhci_hcd 0000:03:00.0: xHCI host controller not responding, assume dead
[ 9264.462093] xhci_hcd 0000:03:00.0: HC died; cleaning up
[ 9264.462128] xhci_hcd 0000:03:00.0: Timeout while waiting for setup device command
[ 9264.668691] usb 1-9: device not accepting address 7, error -62
[ 9264.668723] usb usb1-port9: couldn't allocate usb_device
Comment 120 Michael 2020-06-13 10:01:27 UTC
Still present on
$ uname -r
5.7.2-arch1-1
Comment 121 himanshuxd 2020-06-24 14:37:12 UTC
Have the same error 
$ dmesg | grep xhci 
has
[40557.207677] xhci_hcd 0000:00:14.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state
Comment 122 Roger Wolff 2020-07-04 15:28:14 UTC
I'm using "stock Ubuntu 20.04" 

I have this happening on kernel 5.4.0 . 

[ 4063.051692] usb 3-10.4: New USB device found, idVendor=0483, idProduct=5740, bcdDevice= 2.00
[ 4063.051695] usb 3-10.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 4063.051696] usb 3-10.4: Product: ChibiOS/RT Virtual COM Port
[ 4063.051698] usb 3-10.4: Manufacturer: STMicroelectronics
[ 4063.051699] usb 3-10.4: SerialNumber: 400
[ 4063.058680] cdc_acm 3-10.4:1.0: ttyACM1: USB ACM device
[ 4073.043695] xhci_hcd 0000:00:14.0: WARN Cannot submit Set TR Deq Ptr
[ 4073.043697] xhci_hcd 0000:00:14.0: A Set TR Deq Ptr command is pending.
[ 4073.059819] xhci_hcd 0000:00:14.0: WARN Cannot submit Set TR Deq Ptr
[ 4073.059822] xhci_hcd 0000:00:14.0: A Set TR Deq Ptr command is pending.

I plugged in my development board that provides a virtual comport. I then hit boot-and-reset buttons on the board to make it boot into DFU bootloader mode. 

This has worked the last decade or so.  I didn't read everything above, but I saw something about AMD... I have: 

00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 05)

as the USB controller: Not AMD. -> Not hardware vendor related imho.
Comment 123 sixerjman 2020-07-04 15:32:51 UTC
Happening at ~30 second intervals on Debian kernel 5.7.0-1-amd64 with Dell XHCI Controller and USB 3.0 hub:

xhci_hcd 0000:00:10.0: WARN Cannot submit Set TR Deq Ptr
Jul  4 05:02:32 hostname kernel: [33164.415980] xhci_hcd 0000:00:10.0: A Set TR Deq Ptr command is pending.
Jul  4 05:02:32 hostname kernel: [33164.497202] usb 3-3.1: reset SuperSpeed Gen 1 USB device number 3 using xhci_hcd
Comment 124 Roger Wolff 2020-07-04 15:50:53 UTC
I've now managed to get a workable situation for myself: 
Using an old USB2-hub instead of the USB3-hub that I was using before. 

The DFU download takes ages when there is no hub between my computer and the STM32. Using the USB3-hub worked a few months ago when I was still on Ubuntu 16.04. 

[ 5382.799225] usb 3-4.1: Product: ChibiOS/RT Virtual COM Port
[ 5382.799226] usb 3-4.1: Manufacturer: STMicroelectronics
[ 5382.799227] usb 3-4.1: SerialNumber: 400
[ 5382.807282] cdc_acm 3-4.1:1.0: ttyACM3: USB ACM device
[ 5387.003761] usb 3-4: clear tt 1 (91a1) error -32
About 12 identical messages in the same millisecond deleted. 
[ 5387.004976] usb 3-4: clear tt 1 (91a1) error -32
[ 5387.222030] usb 3-4.1: USB disconnect, device number 22
[ 5387.224061] cdc_acm 3-4.1:1.0: failed to set dtr/rts
[ 5387.522299] usb 3-4.1: new full-speed USB device number 23 using xhci_hcd
[ 5387.627345] usb 3-4.1: New USB device found, idVendor=0483, idProduct=df11, bcdDevice=22.00
[ 5387.627348] usb 3-4.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 5387.627350] usb 3-4.1: Product: STM32  BOOTLOADER
[ 5387.627352] usb 3-4.1: Manufacturer: STMicroelectronics
[ 5387.627353] usb 3-4.1: SerialNumber: FFFFFFFEFFFF

So this is a mostly normal switchover from the usercode running ACM USB code and the bootloader. Through an USB2 switch.
Comment 125 masterl 2020-08-04 10:30:38 UTC
I was getting similar freezes with HP ENVY x360 Convertible 15 running OpenSUSE Leap 15.2. 
This laptop model doesn't come with an RJ45 (LAN) port so I use a Type C USB ethernet adapter. And it was exhibiting the same problems, after some time it would just fail to work and initially I thought it was the NetworkManager.
For me even running the command 'ip add' would lock up, yet most other commands and even the desktop manager would still be working fine. But I couldn't get network back or even switch to WiFi. Basically every time this happened I had to restart the laptop. 

Anyway, after going through the accounts here and other sites I found one which suggested that the issue could be with power management suspending the USB device. 

So I added the particular USB to TLP black_list to prevent it from being suspended and so far I've gon 24 hrs without the lockup.

Link to forum: https://forum.manjaro.org/t/usb-ethernet-dongle-stopped-working/125717
Comment 126 Michael 2020-09-03 09:35:32 UTC
Still present on:
$ uname -r
5.8.5-arch1-1

device connected to USB3 port:
[15005.134111] usb 1-2: new high-speed USB device number 13 using xhci_hcd
[15005.311803] usb 1-2: New USB device found, idVendor=148f, idProduct=5370, bcdDevice= 1.01
[15005.311807] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[15005.311810] usb 1-2: Product: 802.11 n WLAN
[15005.311812] usb 1-2: Manufacturer: Ralink
[15005.311814] usb 1-2: SerialNumber: 1.0
[15005.602591] usb 1-2: reset high-speed USB device number 13 using xhci_hcd
[15005.834856] ieee80211 phy0: rt2x00_set_rt: Info - RT chipset 5390, rev 0502 detected
[15006.513400] ieee80211 phy0: rt2x00_set_rf: Info - RF chipset 5370 detected
[15006.519415] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[15006.520103] usbcore: registered new interface driver rt2800usb
[15006.532103] rt2800usb 1-2:1.0 wlp3s0f0u2: renamed from wlan0
...
[15062.425086] Bluetooth: Core ver 2.22
[15062.425100] NET: Registered protocol family 31
[15062.425101] Bluetooth: HCI device and connection manager initialized
[15062.425103] Bluetooth: HCI socket layer initialized
[15062.425105] Bluetooth: L2CAP socket layer initialized
[15062.425107] Bluetooth: SCO socket layer initialized
[15068.677302] xhci_hcd 0000:03:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.

Any ideas, why HCI device and connection manager initialized?
The device doesn't have BT:
$ lsusb
Bus 001 Device 013: ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter

device connected to USB2 port:
[15317.960151] usb 5-1.1.2: new high-speed USB device number 6 using xhci_hcd
[15318.186487] usb 5-1.1.2: New USB device found, idVendor=148f, idProduct=5370, bcdDevice= 1.01
[15318.186492] usb 5-1.1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[15318.186495] usb 5-1.1.2: Product: 802.11 n WLAN
[15318.186497] usb 5-1.1.2: Manufacturer: Ralink
[15318.186498] usb 5-1.1.2: SerialNumber: 1.0
[15318.376954] usb 5-1.1.2: reset high-speed USB device number 6 using xhci_hcd
[15318.593739] ieee80211 phy1: rt2x00_set_rt: Info - RT chipset 5390, rev 0502 detected
[15318.603488] ieee80211 phy1: rt2x00_set_rf: Info - RF chipset 5370 detected
[15318.603596] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
[15318.626103] rt2800usb 5-1.1.2:1.0 wlp39s0f3u1u1u2: renamed from wlan0
...
[15336.958194] ieee80211 phy1: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[15336.958238] ieee80211 phy1: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.36

everything is fine!
Comment 127 Martin Jørgensen 2020-09-04 14:50:45 UTC
Experiencing the same kinda issues with my local Gentoo system on linux 5.4.60 running on my AMD Threadripper ASUS X399-A system.

[59417.351322] Bluetooth: HCI device and connection manager initialized
[59417.351326] Bluetooth: HCI socket layer initialized
[59417.351327] Bluetooth: L2CAP socket layer initialized
[59417.351330] Bluetooth: SCO socket layer initialized
[59417.356567] usbcore: registered new interface driver btusb
[59417.401190] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[59417.401191] Bluetooth: BNEP filters: protocol multicast
[59417.401195] Bluetooth: BNEP socket layer initialized
[59746.085438] debugfs: File 'le_min_key_size' in directory 'hci0' already present!
[59746.085445] debugfs: File 'le_max_key_size' in directory 'hci0' already present!
[59746.085450] debugfs: File 'force_bredr_smp' in directory 'hci0' already present!
[59814.624020] input: WH-1000XM2 (AVRCP) as /devices/virtual/input/input23
[59902.644488] snd_hda_intel 0000:0b:00.3: Too big adjustment 128
[59962.175286] snd_hda_intel 0000:0b:00.3: Too big adjustment 128
[60729.936646] Bluetooth: RFCOMM TTY layer initialized
[60729.936651] Bluetooth: RFCOMM socket layer initialized
[60729.936655] Bluetooth: RFCOMM ver 1.11
[61319.535471] usb 1-3: USB disconnect, device number 20
[61319.536250] xhci_hcd 0000:01:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
[61333.523244] usb 1-3: new full-speed USB device number 21 using xhci_hcd
[61333.947814] usb 1-3: New USB device found, idVendor=0a12, idProduct=0001, bcdDevice=88.91
[61333.947818] usb 1-3: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[61333.947819] usb 1-3: Product: CSR8510 A10
[61454.719213] usb 1-3: USB disconnect, device number 21
[61454.719807] xhci_hcd 0000:01:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
Comment 128 Martin Jørgensen 2020-09-05 05:46:17 UTC
For my system, it seems to trigger after resuming from suspend.
Comment 129 Kopa Rebu 2020-09-13 16:51:20 UTC
Hi,

I'd like to add some information here about this issue, which in one of my computers happens when using a Software Defined Radio (SDR) device on some of the motherboard USB ports:

* The device works OK when using the back panel USB 3.2 Gen 1 ports
* It doesn't work OK when using the back panel USB 3.2 Gen 2 ports, or when using the front headers (either USB 3.2 Gen 1 or USB 2.0)

When I finish using the device, the following message gets logged. I have to disconnect it and plug it in again in order to use it:

xhci_hcd 0000:02:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.

This motherboard is an ASUS Prime B550M.

Kernel 5.4.0-45-generic (from Ubuntu 20.04).

I've tried booting with "intel_iommu=off" or "iommu=off" just for testing, but the result is the same.
Comment 130 Michael 2020-10-02 11:07:05 UTC
Just received an AMD notebook to run some tests on 5.8.12-arch1-1:

ASUS TUF Gaming FX505D
05:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Raven USB 3.1

WiFi adapter:
ID 148f:3070 Ralink Technology, Corp. RT2870/RT3070 Wireless Adapter

[  308.749192] usb 1-2: new high-speed USB device number 46 using xhci_hcd
[  308.909139] usb 1-2: New USB device found, idVendor=148f, idProduct=3070, bcdDevice= 1.01
[  308.909145] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  308.909148] usb 1-2: Product: 802.11 n WLAN
[  308.909150] usb 1-2: Manufacturer: Ralink
[  308.909153] usb 1-2: SerialNumber: 1.0
[  309.032719] usb 1-2: reset high-speed USB device number 46 using xhci_hcd
[  309.188373] ieee80211 phy40: rt2x00_set_rt: Info - RT chipset 3070, rev 0201 detected
[  309.276422] ieee80211 phy40: rt2x00_set_rf: Info - RF chipset 0005 detected
[  309.277177] ieee80211 phy40: Selected rate control algorithm 'minstrel_ht'
[  309.297319] rt2800usb 1-2:1.0 wlp5s0f3u2: renamed from wlan0
[  309.338896] ieee80211 phy40: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[  309.338980] ieee80211 phy40: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.36
[  310.619294] usb 1-2: USB disconnect, device number 46
[  311.185849] ieee80211 phy40: rt2x00queue_flush_queue: Warning - Queue 0 failed to flush

Then xhci died.
Comment 131 Micha 2020-10-09 13:08:55 UTC
Hi,

I have the same problem with an Argus KVM switch. The mouse stopped atfer the first click to work.

uname -a
Linux sysiphus 5.8.0-2-amd64 #1 SMP Debian 5.8.10-1 (2020-09-19) x86_64 GNU/Linux

Debian Sid


❯ lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 004: ID 046d:c245 Logitech, Inc. G400 Optical Mouse
Bus 003 Device 003: ID 046d:c326 Logitech, Inc. Washable Keyboard K310
Bus 003 Device 002: ID 1a86:8072 QinHeng Electronics
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

journald
Okt 07 19:29:43 sysiphus kernel: usb 3-2: USB disconnect, device number 2
Okt 07 19:29:43 sysiphus kernel: usb 3-2.1: USB disconnect, device number 3
Okt 07 19:29:43 sysiphus acpid[587]: input device has been disconnected, fd 5
Okt 07 19:29:43 sysiphus kernel: xhci_hcd 0000:08:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
Okt 07 19:29:43 sysiphus acpid[587]: input device has been disconnected, fd 6
Okt 07 19:29:43 sysiphus acpid[587]: input device has been disconnected, fd 12
Okt 07 19:29:43 sysiphus kernel: usb 3-2.2: USB disconnect, device number 4
Okt 07 19:29:43 sysiphus kernel: xhci_hcd 0000:08:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.

dmesg with debug
[ 2539.095820] xhci_hcd 0000:00:14.0: // Ding dong!
[ 2539.095824] xhci_hcd 0000:00:14.0: // Ding dong!
[ 2539.095840] xhci_hcd 0000:00:14.0: Slot 17 output ctx = 0x3eac96000 (dma)
[ 2539.095841] xhci_hcd 0000:00:14.0: Slot 17 input ctx = 0x3ef030000 (dma)
[ 2539.095843] xhci_hcd 0000:00:14.0: Set slot id 17 dcbaa entry 000000003007eed2 to 0x3eac96000
[ 2539.173763] usb 1-10.2: new full-speed USB device number 18 using xhci_hcd
[ 2539.173772] xhci_hcd 0000:00:14.0: Set root hub portnum to 10
[ 2539.173775] xhci_hcd 0000:00:14.0: Set fake root hub portnum to 10
[ 2539.173778] xhci_hcd 0000:00:14.0: udev->tt = 000000002e0e39e0
[ 2539.173781] xhci_hcd 0000:00:14.0: udev->ttport = 0xa
[ 2539.173789] xhci_hcd 0000:00:14.0: // Ding dong!
[ 2539.174915] xhci_hcd 0000:00:14.0: Successful setup address command
[ 2539.174922] xhci_hcd 0000:00:14.0: Op regs DCBAA ptr = 0x000003ead2c000
[ 2539.174928] xhci_hcd 0000:00:14.0: Slot ID 17 dcbaa entry @000000003007eed2 = 0x000003eac96000
[ 2539.174933] xhci_hcd 0000:00:14.0: Output Context DMA address = 0x3eac96000
[ 2539.174937] xhci_hcd 0000:00:14.0: Internal device address = 17
[ 2539.198845] xhci_hcd 0000:00:14.0: Max Packet Size for ep 0 changed.
[ 2539.198851] xhci_hcd 0000:00:14.0: Max packet size in usb_device = 8
[ 2539.198854] xhci_hcd 0000:00:14.0: Max packet size in xHCI HW = 64
[ 2539.198857] xhci_hcd 0000:00:14.0: Issuing evaluate context command.
[ 2539.198867] xhci_hcd 0000:00:14.0: // Ding dong!
[ 2539.198886] xhci_hcd 0000:00:14.0: Successful evaluate context command
[ 2539.200465] usb 1-10.2: no configurations
[ 2539.200472] usb 1-10.2: can't read configurations, error -22
[ 2539.200634] xhci_hcd 0000:00:14.0: // Ding dong!
[ 2539.200641] usb 1-10-port2: unable to enumerate USB device


https://www.sendspace.com/file/d923jl trace file

All other kernel parameters above I have tested without success.



Micha
Comment 132 Eric H. 2020-11-28 06:37:47 UTC
I have same issue with HackRF SDR, and there's a bug on their side

https://github.com/mossmann/hackrf/issues/783


I connect device:

[  428.013129] usb 1-10: USB disconnect, device number 4
[ 2163.462098] usb 1-10: new high-speed USB device number 6 using xhci_hcd
[ 2163.699532] usb 1-10: New USB device found, idVendor=1d50, idProduct=6089, bcdDevice= 1.02
[ 2163.699535] usb 1-10: New USB device strings: Mfr=1, Product=2, SerialNumber=4
[ 2163.699536] usb 1-10: Product: HackRF One
[ 2163.699538] usb 1-10: Manufacturer: Great Scott Gadgets
[ 2163.699539] usb 1-10: SerialNumber: 0000000000000000b65c67dc32a3535f

I run test once, and after device close:

[ 2187.589321] xhci_hcd 0000:02:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.

Then, if I try to run other tests, the device no longer respond until I reset the device (it has a reset button) or disconnect/reconnect it.

Here, I have the same setup as some other people reporting the issue, a B350 chipset (Ryzen 2700X), on ASUS ROG STRIX B350-F GAMING motherboard.

Kernel version: uname -a
Linux lx-ryzen 5.4.0-53-generic #59-Ubuntu SMP Wed Oct 21 09:38:44 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

This does the issue with USB3 and USB2 ports.

This same device work fine on another computer (a non-Ryzen laptop), same kernel.
Comment 133 Eric H. 2020-11-28 16:04:28 UTC
Same result with B450 chipset, same kernel.
ASUS PRIME B450M-A motherboard.
Comment 134 Bernhard 2020-11-28 16:39:11 UTC
Could this issue be caused by USB Controllers / Chipsets made by ASMedia?
B350 / X370 / B450 / X470 Chipsets are all manufactured by ASMedia.
 
And @Michael mentioned that one of his Intel systems (I'm assuming the one with a Asus P9X79 motherboard?) has issues with USB 3, but not with USB 2. So I looked up that particular mobo and guess what:

ASMedia® USB 3.0 controller :
4 x USB 3.1 Gen 1 port(s) (4 at back panel, blue)
Intel® X79 chipset :
14 x USB 2.0 port(s) (6 at back panel, black+white, 8 at mid-board)

Only the USB 3.1 Gen 1 Ports are using the ASMedia controller.
Comment 135 Micha 2020-11-28 17:16:34 UTC
My board has two controllers and both shows the same behaviour.

lspci|grep "USB controller"
00:14.0 USB controller: Intel Corporation 200 Series/Z370 Chipset Family USB 3.0 xHCI Controller
08:00.0 USB controller: ASMedia Technology Inc. ASM1142 USB 3.1 Host Controller

Asus PRIME Z270-K, BIOS 1207 06/22/2018
Comment 136 WGH 2020-12-01 02:37:08 UTC
The same problem with HackRF: it stops working after using it once (presumably due to transfers being cancelled on exit). hackrf_info still detects it though, which is probably because only the bulk transfer endpoint becomes broken.

Kernel 5.9.11

ASRock B550 Extreme4, BIOS P1.20 08/13/2020

01:00.0 USB controller: Advanced Micro Devices, Inc. [AMD] Device 43ee
0c:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Matisse USB 3.0 Host Controller

The debug messages on stopping the tool:

[ 3944.894483] xhci_hcd 0000:01:00.0: Transfer error for slot 28 ep 2 on endpoint
[ 3944.894494] xhci_hcd 0000:01:00.0: // Ding dong!
[ 3944.894602] xhci_hcd 0000:01:00.0: Ignoring reset ep completion code of 1
[ 3945.396550] xhci_hcd 0000:01:00.0: Cancel URB 000000008085c3f5, dev 5, ep 0x81, starting at offset 0x1fa7ae1c90
[ 3945.396558] xhci_hcd 0000:01:00.0: // Ding dong!
[ 3945.396690] xhci_hcd 0000:01:00.0: Removing canceled TD starting at 0x1fa7ae1c90 (dma).
[ 3945.396710] xhci_hcd 0000:01:00.0: Cancel URB 000000000098c2b5, dev 5, ep 0x81, starting at offset 0x1fa7ae1990
[ 3945.396712] xhci_hcd 0000:01:00.0: // Ding dong!
[ 3945.396836] xhci_hcd 0000:01:00.0: Removing canceled TD starting at 0x1fa7ae1990 (dma).
[ 3945.396839] xhci_hcd 0000:01:00.0: Finding endpoint context
[ 3945.396841] xhci_hcd 0000:01:00.0: Cycle state = 0x1
[ 3945.396843] xhci_hcd 0000:01:00.0: New dequeue segment = 000000008a0bf921 (virtual)
[ 3945.396845] xhci_hcd 0000:01:00.0: New dequeue pointer = 0x1fa7ae1a90 (DMA)
[ 3945.396847] xhci_hcd 0000:01:00.0: Set TR Deq Ptr cmd, new deq seg = 000000008a0bf921 (0x1fa7ae1000 dma), new deq ptr = 00000000e5711e6d (0x1fa7ae1a90 dma), new cycle = 1
[ 3945.396851] xhci_hcd 0000:01:00.0: // Ding dong!
[ 3945.396869] xhci_hcd 0000:01:00.0: Cancel URB 000000008b1032dd, dev 5, ep 0x81, starting at offset 0x1fa7ae1a90
[ 3945.396871] xhci_hcd 0000:01:00.0: // Ding dong!
[ 3945.396904] xhci_hcd 0000:01:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
[ 3945.396909] xhci_hcd 0000:01:00.0: Slot state = 3, EP state = 2
[ 3945.397028] xhci_hcd 0000:01:00.0: Removing canceled TD starting at 0x1fa7ae1a90 (dma).
[ 3945.397040] xhci_hcd 0000:01:00.0: Cancel URB 00000000b1b43562, dev 5, ep 0x81, starting at offset 0x1fa7ae1b90
[ 3945.397042] xhci_hcd 0000:01:00.0: // Ding dong!
[ 3945.397172] xhci_hcd 0000:01:00.0: Removing canceled TD starting at 0x1fa7ae1b90 (dma).

Messages on attempts to use the device again:

[ 4076.243019] xhci_hcd 0000:01:00.0: WARN halted endpoint, queueing URB anyway.
[ 4076.243029] xhci_hcd 0000:01:00.0: WARN halted endpoint, queueing URB anyway.
[ 4076.243044] xhci_hcd 0000:01:00.0: WARN halted endpoint, queueing URB anyway.
[ 4076.243051] xhci_hcd 0000:01:00.0: WARN halted endpoint, queueing URB anyway.
[ 4077.749450] xhci_hcd 0000:01:00.0: Cancel URB 0000000063c2cde4, dev 5, ep 0x81, starting at offset 0x1fa7ae1d90
[ 4077.749456] xhci_hcd 0000:01:00.0: // Ding dong!
[ 4077.749592] xhci_hcd 0000:01:00.0: Removing canceled TD starting at 0x1fa7ae1d90 (dma).
[ 4077.749620] xhci_hcd 0000:01:00.0: Cancel URB 00000000564ffbd2, dev 5, ep 0x81, starting at offset 0x1fa7ae1e90
[ 4077.749622] xhci_hcd 0000:01:00.0: // Ding dong!
[ 4077.749748] xhci_hcd 0000:01:00.0: Removing canceled TD starting at 0x1fa7ae1e90 (dma).
[ 4077.749761] xhci_hcd 0000:01:00.0: Cancel URB 00000000ff7fb480, dev 5, ep 0x81, starting at offset 0x1fa7ae1f90
[ 4077.749763] xhci_hcd 0000:01:00.0: // Ding dong!
[ 4077.749892] xhci_hcd 0000:01:00.0: Removing canceled TD starting at 0x1fa7ae1f90 (dma).
[ 4077.749906] xhci_hcd 0000:01:00.0: Cancel URB 00000000f83271e0, dev 5, ep 0x81, starting at offset 0x1fa7ae00a0
[ 4077.749908] xhci_hcd 0000:01:00.0: // Ding dong!
[ 4077.750035] xhci_hcd 0000:01:00.0: Removing canceled TD starting at 0x1fa7ae00a0 (dma).
Comment 137 Eric H. 2020-12-02 00:17:10 UTC
I think I've narrow it down to a minimum.

Using libusb, if you happen to call libusb_control_transfer(), which is synchronous I/O, while there's asynchronous I/O already in progress (usually caused by application error), then the cleanup to the in-progress asynchronous I/O will cause the error.

Ex:
...
libusb_submit_transfer(...); // Start async I/O
...
libusb_control_transfer(...); // Sync I/O
...
libusb_cancel_transfer(...); // .... WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
...


Or, simply

...
libusb_submit_transfer(...); // Start async I/O
...
libusb_control_transfer(...); // Sync I/O
...
libusb_release_interface(...); // Will cleanup async I/O in progress .... WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
...


The thing is that in the example above, even though there's an application error, the behavior is different on different chipset driver.

In the case of HackRF application (which I mentioned above), the application called libusb_cancel_transfer() on exit followed by a libusb_control_transfer.  That should work, since the async (streaming) I/O were truminated before sync I/O, but a final callback did a call (by mistake, did not check that the driver was in process of shutting down) to libusb_submit_transfer().  This created a race condition in which if that made it possible to trigger the above bug (made easily reproducible with properly placed 'sleep()' call).
Comment 138 S4ndm4n 2021-01-15 16:07:44 UTC
Same problems here:

ASUS X470-F Gaming
Ryzen 2700x

most problems i have with rt2800usb driver.

Any progress?
Comment 139 Mathias Nyman 2021-01-18 14:47:41 UTC
rewritten URB cancel, endpoint stop and set trb deq can be found in my tree
in rewrite_halt_stop_handling branch

git://git.kernel.org/pub/scm/linux/kernel/git/mnyman/xhci.git rewrite_halt_stop_handling  

https://git.kernel.org/pub/scm/linux/kernel/git/mnyman/xhci.git/log/?h=rewrite_halt_stop_handling

Does that help?
Comment 140 Térence Clastres 2021-01-18 17:31:22 UTC
Created attachment 294739 [details]
Patch from Nyman's rewrite_halt_stop_handling branch
Comment 141 Térence Clastres 2021-01-18 17:42:13 UTC
(In reply to Mathias Nyman from comment #139)
> rewritten URB cancel, endpoint stop and set trb deq can be found in my tree
> in rewrite_halt_stop_handling branch
> 
> git://git.kernel.org/pub/scm/linux/kernel/git/mnyman/xhci.git
> rewrite_halt_stop_handling  
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/mnyman/xhci.git/log/
> ?h=rewrite_halt_stop_handling
> 
> Does that help?

Just created the corresponding patch to easily apply your changes to linux 5.10.y.

I don't get "WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state." anymore, but the problem is still here.

After connecting my android phone, I start to get `hub 2-8:1.0: hub_ext_port_status failed (err = -110)` and `device descriptor read/8, error -110` spammed for a while.
The immediate issue is the usb port in question not working but what's worrying is the issue seems to propagate to other usb ports like the ones used by my mouse or keyboard. I guess it's because they are part of the same hub?
Maybe this problem is unrelated but in any case let me know.
Comment 142 Michael 2021-01-18 17:53:18 UTC
Thanks for your effort. Unfortunately it doesn't fix the issue.
Tested two WiFi devices on
$ uname -r
5.10.7-arch1-1

First device:
$ lsusb
ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter

[  109.165827] usb 1-2: new high-speed USB device number 4 using xhci_hcd
[  109.410190] usb 1-2: New USB device found, idVendor=148f, idProduct=5370, bcdDevice= 1.01
[  109.410195] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  109.410197] usb 1-2: Product: 802.11 n WLAN
[  109.410199] usb 1-2: Manufacturer: Ralink
[  109.410201] usb 1-2: SerialNumber: 1.0
[  109.624366] usb 1-2: reset high-speed USB device number 4 using xhci_hcd
[  109.858679] ieee80211 phy1: rt2x00_set_rt: Info - RT chipset 5390, rev 0502 detected
[  110.536313] ieee80211 phy1: rt2x00_set_rf: Info - RF chipset 5370 detected
[  110.542761] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
[  110.555906] rt2800usb 1-2:1.0 wlp3s0f0u2: renamed from wlan0
[  117.628420] ieee80211 phy1: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[  117.628459] ieee80211 phy1: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.36

Now running WiFi driver test (we use monitor mode to produce heavy workload):
$ sudo hcxdumptool -i wlp3s0f0u2 --check_driver

[  121.752121] device wlp3s0f0u2 entered promiscuous mode
[  121.771509] xhci_hcd 0000:03:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
[  121.822851] device wlp3s0f0u2 left promiscuous mode


Second device:
$ lsusb:
ID 148f:5572 Ralink Technology, Corp. RT5572 Wireless Adapter

[  419.565208] usb 1-2: new high-speed USB device number 5 using xhci_hcd
[  419.741196] usb 1-2: New USB device found, idVendor=148f, idProduct=5572, bcdDevice= 1.01
[  419.741201] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  419.741204] usb 1-2: Product: 802.11 n WLAN
[  419.741206] usb 1-2: Manufacturer: Ralink
[  419.741208] usb 1-2: SerialNumber: 1.0
[  419.950046] usb 1-2: reset high-speed USB device number 5 using xhci_hcd
[  420.181669] ieee80211 phy2: rt2x00_set_rt: Info - RT chipset 5592, rev 0222 detected
[  420.859692] ieee80211 phy2: rt2x00_set_rf: Info - RF chipset 000f detected
[  420.868375] ieee80211 phy2: Selected rate control algorithm 'minstrel_ht'
[  420.887633] rt2800usb 1-2:1.0 wlp3s0f0u2: renamed from wlan0
[  434.285018] ieee80211 phy2: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[  434.285066] ieee80211 phy2: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.36

Now running WiFi driver test (we use monitor mode to produce heavy workload):
$ sudo hcxdumptool -i wlp3s0f0u2 --check_driver

[  463.468004] device wlp3s0f0u2 entered promiscuous mode
[  537.382571] xhci_hcd 0000:03:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
[  537.384485] ieee80211 phy2: rt2x00usb_vendor_request: Error - Vendor Request 0x07 failed for offset 0x0500 with error -19
[  537.411446] device wlp3s0f0u2 left promiscuous mode
Comment 143 Bernhard 2021-01-18 19:34:58 UTC
The message "WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state." is gone for me, but the device still doesn't work after unplugging it and plugging it in again.

After unplugging I get this message in dmesg:
ieee80211 phy1: rt2x00usb_vendor_request: Error - Vendor Request 0x06 failed for offset 0x1004 with error -19
Comment 144 S4ndm4n 2021-01-18 20:29:11 UTC
I am on Kali Linux 2020.4 and tried to use the patch @Mathias Nyman released.

but it failed.

did someone know a tutorial on how to do this on Kali?
Comment 145 Michael 2021-01-19 09:52:47 UTC
An ASUS TUF Gaming notebook (AMD Ryzen 5 3550H), showing a different behavior on the same device:
$ lsusb
ID 148f:5572 Ralink Technology, Corp. RT5572 Wireless Adapter

$ uname -r
5.10.7-arch1-1

$ lspci
00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Root Complex
00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 IOMMU
00:01.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge
00:01.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 PCIe GPP Bridge [6:0]
00:01.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 PCIe GPP Bridge [6:0]
00:01.3 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 PCIe GPP Bridge [6:0]
00:01.7 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 PCIe GPP Bridge [6:0]
00:08.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-1fh) PCIe Dummy Host Bridge
00:08.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Internal PCIe GPP Bridge 0 to Bus A
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 61)
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 51)
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 0
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 1
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 2
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 3
00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 4
00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 5
00:18.6 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 6
00:18.7 Host bridge: Advanced Micro Devices, Inc. [AMD] Raven/Raven2 Device 24: Function 7
01:00.0 VGA compatible controller: NVIDIA Corporation TU117M [GeForce GTX 1650 Mobile / Max-Q] (rev a1)
01:00.1 Audio device: NVIDIA Corporation Device 10fa (rev a1)
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)
03:00.0 Non-Volatile memory controller: Micron Technology Inc Device 5410 (rev 01)
04:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8821CE 802.11ac PCIe Wireless Network Adapter
05:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Picasso (rev c2)
05:00.2 Encryption controller: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) Platform Security Processor
05:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Raven USB 3.1
05:00.4 USB controller: Advanced Micro Devices, Inc. [AMD] Raven USB 3.1
05:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) HD Audio Controller


We end up in an endless " rt2x00queue_flush_queue: Warning - Queue 0 failed to flush" / "USB disconnect, device number x" loop, which spam dmesg:
[   61.139415] usb 3-2: new high-speed USB device number 3 using xhci_hcd
[   61.297702] usb 3-2: New USB device found, idVendor=148f, idProduct=5572, bcdDevice= 1.01
[   61.297708] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   61.297712] usb 3-2: Product: 802.11 n WLAN
[   61.297714] usb 3-2: Manufacturer: Ralink
[   61.297716] usb 3-2: SerialNumber: 1.0
[   61.466255] usb 3-2: reset high-speed USB device number 3 using xhci_hcd
[   61.620283] ieee80211 phy1: rt2x00_set_rt: Info - RT chipset 5592, rev 0222 detected
[   61.709535] ieee80211 phy1: rt2x00_set_rf: Info - RF chipset 000f detected
[   61.711046] ieee80211 phy1: Selected rate control algorithm 'minstrel_ht'
[   61.711993] usbcore: registered new interface driver rt2800usb
[   61.724424] rt2800usb 3-2:1.0 wlp5s0f4u2: renamed from wlan0
[   61.756915] ieee80211 phy1: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[   61.757186] ieee80211 phy1: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.36
[   72.279569] usb 3-2: USB disconnect, device number 3
[   72.846030] ieee80211 phy1: rt2x00queue_flush_queue: Warning - Queue 0 failed to flush
[   73.249377] usb 3-2: new high-speed USB device number 4 using xhci_hcd
[   73.407318] usb 3-2: New USB device found, idVendor=148f, idProduct=5572, bcdDevice= 1.01
[   73.407324] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   73.407328] usb 3-2: Product: 802.11 n WLAN
[   73.407330] usb 3-2: Manufacturer: Ralink
[   73.407332] usb 3-2: SerialNumber: 1.0
[   73.532850] usb 3-2: reset high-speed USB device number 4 using xhci_hcd
[   73.683428] ieee80211 phy2: rt2x00_set_rt: Info - RT chipset 5592, rev 0222 detected
[   73.768177] ieee80211 phy2: rt2x00_set_rf: Info - RF chipset 000f detected
[   73.769304] ieee80211 phy2: Selected rate control algorithm 'minstrel_ht'
[   73.787530] rt2800usb 3-2:1.0 wlp5s0f4u2: renamed from wlan0
[  112.379076] device wlp5s0f4u2 entered promiscuous mode
[  153.340032] usb 3-2: USB disconnect, device number 4
[  153.905735] ieee80211 phy2: rt2x00queue_flush_queue: Warning - Queue 0 failed to flush
[  153.926132] device wlp5s0f4u2 left promiscuous mode
[  154.315733] usb 3-2: new high-speed USB device number 5 using xhci_hcd
[  154.474372] usb 3-2: New USB device found, idVendor=148f, idProduct=5572, bcdDevice= 1.01
[  154.474378] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  154.474381] usb 3-2: Product: 802.11 n WLAN
[  154.474383] usb 3-2: Manufacturer: Ralink
[  154.474385] usb 3-2: SerialNumber: 1.0
[  154.599207] usb 3-2: reset high-speed USB device number 5 using xhci_hcd
[  154.748666] ieee80211 phy3: rt2x00_set_rt: Info - RT chipset 5592, rev 0222 detected
[  154.833665] ieee80211 phy3: rt2x00_set_rf: Info - RF chipset 000f detected
[  154.834795] ieee80211 phy3: Selected rate control algorithm 'minstrel_ht'
[  154.850542] rt2800usb 3-2:1.0 wlp5s0f4u2: renamed from wlan0
[  157.356200] ieee80211 phy3: rt2x00lib_request_firmware: Info - Loading firmware file 'rt2870.bin'
[  157.356259] ieee80211 phy3: rt2x00lib_request_firmware: Info - Firmware detected - version: 0.36


I double checked all devices, cables and connectors to make sure that they are working as expected, running a Raspberry Pi B+:
$ uname -r
5.4.83-3-ARCH
No "WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state"
No "rt2x00queue_flush_queue: Warning - Queue 0 failed to flush"
No "USB disconnect, device number x"

Arch Arm is still on 5.4 LTS. But that doesn't matter, because the xhci issue is present on my AMD RYZEN systems (and some Intel systems) since 4.20
BTW:
I expect that Arch Arm move to 5.10 LTS, soon. It take too much time for me to compile latest kernel on a Raspberry - so I have to wait.
Comment 146 Michael 2021-01-19 10:33:57 UTC
@ S4ndm4n KALI is not the best choice to do module tests. It is designed to perform penetration tests and many modules are either patched or third party modules.
Comment 147 Stanislaw Gruszka 2021-01-20 13:25:03 UTC
Since issue affects mostly rt2800usb devices, maybe we can add quirk to xhci to restore pre 4.20 behaviour for endpoints that are used by rt2800usb. 

Please check if patch like this make the problem gone: 

diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index dfa61de7c83f..b75a16e5cc9d 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -2568,6 +2568,8 @@ static int process_bulk_intr_td(struct xhci_hcd *xhci, struct xhci_td *td,
                remaining       = 0;
                break;
        case COMP_USB_TRANSACTION_ERROR:
+               if (1) /* this will be quirk for disable Soft Retry */
+                       break;
                if ((ep_ring->err_count++ > MAX_SOFT_RETRY) ||
                    le32_to_cpu(slot_ctx->tt_info) & TT_SLOT)
                        break;

If it does, I could then prepare patch that will change this part only for rt2800usb.
Comment 148 Bernhard 2021-01-20 13:40:11 UTC
This patch fixes the issue for me
Comment 149 Michael 2021-01-20 14:08:14 UTC
Doesn't work on
$ uname -r
5.10.8-arch1-1
and 
ID 148f:5572 Ralink Technology, Corp. RT5572 Wireless Adapter

Warning "WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state." is gone, but interface freeze.

To reproduce the issue:
$ hcxdumptool -I
wlan interfaces:
dc4ef4086e71 wlp3s0f0u2 (rt2800usb)

$ sudo hcxdumptool -i wlp3s0f0u2 --check_injection
initialization...
interface freeze and must be disconnected


expected result (we use a chipset, known as working regardless of the xhci issue connected to tthe same USB3 port):
ID 148f:3070 Ralink Technology, Corp. RT2870/RT3070 Wireless Adapter

$ hcxdumptool -I
wlan interfaces:
c83a35cb08e3 wlp3s0f0u2 (rt2800usb)

$ sudo hcxdumptool -i wlp3s0f0u2 --check_injection
initialization...
starting antenna test and packet injection test (that can take up to two minutes)...
available channels: 1,2,3,4,5,6,7,8,9,10,11,12,13,14
packet injection is working on 2.4GHz!
injection ratio: 72% (BEACON: 87 PROBERESPONSE: 63)
your injection ratio is good
antenna ratio: 83% (NETWORK: 24 PROBERESPONSE: 20)
your antenna ratio is excellent, let's ride!
4 driver errors encountered during the test

terminating...

BTW:
Don't worry about the 4 driver errors. The first received packets (via raw socket) after entering monitor mode don't contain a radiotap header. This could be driver related.


BTW:
Now we connect this device
ID 148f:5572 Ralink Technology, Corp. RT5572 Wireless Adapter
to an USB2 port:

$ sudo hcxdumptool -i wlp39s0f3u1u1u2 --check_injection
initialization...
starting antenna test and packet injection test (that can take up to two minutes)...
available channels: 1,2,3,4,5,6,7,8,9,10,11,12,13,14,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,100,102,104,106,108,110,112,114,116,118,120,122,124,126,128,130,132,134,136,138,140,149,151,153,155,157,159,161,165,184,188,192,196
packet injection is working on 2.4GHz!
injection ratio: 31% (BEACON: 16 PROBERESPONSE: 5)
your injection ratio is average, but there is still room for improvement
antenna ratio: 66% (NETWORK: 3 PROBERESPONSE: 2)
your antenna ratio is good

terminating...

No warning, no disconnect, everything is fine.
Comment 150 Stanislaw Gruszka 2021-01-20 14:25:19 UTC
Michael, you experiencing different problem than Bernhard. Perhaps you can bisect this or just check if it ever worked on some older kernel (in this broken case of RT5572 + USB3) .
Comment 151 Michael 2021-01-20 14:52:06 UTC
Stanislaw, are you sure?

Same device, tested on Intel system (xhci unpatched):
Intel(R) Core(TM) i7-3930K CPU @ 3.20GHz
06:00.0 USB controller: ASMedia Technology Inc. ASM1042 SuperSpeed USB Host Controller
07:00.0 USB controller: ASMedia Technology Inc. ASM1042 SuperSpeed USB Host Controller

ASM1042 should be USB3, too - but I'm not sure.

$ uname -r
5.10.8-arch1-1
and 
ID 148f:5572 Ralink Technology, Corp. RT5572 Wireless Adapter

$ sudo hcxdumptool -I
wlan interfaces:
dc4ef4086e71 wlp0s26u1u2 (rt2800usb)

$ sudo hcxdumptool -i wlp0s26u1u2 --check_injection
initialization...
starting antenna test and packet injection test (that can take up to two minutes)...
available channels: 1,2,3,4,5,6,7,8,9,10,11,12,13,14,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,100,102,104,106,108,110,112,114,116,118,120,122,124,126,128,130,132,134,136,138,140,149,151,153,155,157,159,161,165,184,188,192,196
packet injection is working on 2.4GHz!
injection ratio: 35% (BEACON: 176 PROBERESPONSE: 62)
your injection ratio is average, but there is still room for improvement
antenna ratio: 35% (NETWORK: 20 PROBERESPONSE: 7)
your antenna ratio is average, but there is still room for improvement
2 driver errors encountered during the test

terminating...

BTW:
5GHz injection not shown as working, because I haven't set up a 5GHz ACCESS POINT to respond to hcxdumptool
Comment 152 Michael 2021-01-20 14:55:56 UTC
I forgot to mention for the RYZEN system:
03:00.0 USB controller: Advanced Micro Devices, Inc. [AMD] X370 Series Chipset USB 3.1 xHCI Controller (rev 02)
Comment 153 Michael 2021-01-20 15:02:33 UTC
Stanislaw, the difference between them
using ehci-pci on the Intel system
vs
using xhci_hcd on the RYZEN
Thanks for pointing me into this direction.
Comment 154 Stanislaw Gruszka 2021-01-20 15:06:48 UTC
> Stanislaw, are you sure?

Well, I asked to check if hardware combination that is now broken for you ever worked. In Bernhard case it worked on 4.19 and stop to work on 4.20 and he was able to identify broken commit.
Comment 155 Stanislaw Gruszka 2021-01-20 15:16:44 UTC
Created attachment 294785 [details]
rt2800usb_no_soft_retry.patch

This is patch that restore old xhci behaviour only for rt2800usb. I use usb->transfer_flags to add "quirk" flag. Mathias, do you think it's ok to avoid Soft Retry this way, maybe you have some better idea as solution? 

Bernhard, please test if it still fixes the issue for you .
Comment 156 Michael 2021-01-20 15:22:26 UTC
/home/zerobeat/Downloads/linux-5.10.8/drivers/net/wireless/ralink/rt2x00/rt2x00usb.c:217:25: error: 'URB_SOFT_RETRY_NOT_OK' undeclared (first use in this function); did you mean 'URB_SHORT_NOT_OK'?
  217 |  urb->transfer_flags |= URB_SOFT_RETRY_NOT_OK;
      |                         ^~~~~~~~~~~~~~~~~~~~~
      |                         URB_SHORT_NOT_OK
Comment 157 Michael 2021-01-20 15:29:49 UTC
As Bernhard, I can confirm that this patch
https://bugzilla.kernel.org/show_bug.cgi?id=202541#c147
is working for me.
This device
https://bugzilla.kernel.org/show_bug.cgi?id=202541#c10
now is working after applying that patch.
Also I can confirm the the issue on the RT5572 is related to USB3 and it is a new one.
Comment 158 Bernhard 2021-01-20 15:59:02 UTC
When applying the patch from https://bugzilla.kernel.org/show_bug.cgi?id=202541#c155 the device works, but now this message shows up very often in dmesg:

[  194.130691] usb 1-3: BOGUS urb flags, 1000200 --> 200
[  194.130704] WARNING: CPU: 0 PID: 113 at drivers/usb/core/urb.c:517 usb_submit_urb+0x1c9/0x5e0
[  194.130705] Modules linked in: rt2800usb rt2x00usb rt2800lib rt2x00lib snd_usb_audio mac80211 btusb btrtl btbcm snd_usbmidi_lib btintel snd_rawmidi snd_seq_device bluetooth xpad libarc4 mc joydev ff_memless mousedev ecdh_generic ecc cfg80211 ccm algif_aead cbc des_generic libdes ecb edac_mce_amd kvm_amd algif_skcipher rfkill kvm cmac md4 algif_hash af_alg ppdev wmi_bmof irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel aesni_intel crypto_simd snd_hda_codec_realtek cryptd glue_helper snd_hda_codec_generic amdgpu rapl ledtrig_audio snd_hda_codec_hdmi snd_hda_intel snd_intel_dspcfg soundwire_intel soundwire_generic_allocation soundwire_cadence snd_hda_codec vfat fat snd_hda_core snd_hwdep soundwire_bus pcspkr r8169 snd_soc_core k10temp sp5100_tco snd_compress ccp nf_log_ipv6 realtek mdio_devres gpu_sched ac97_bus i2c_piix4 ip6t_REJECT libphy nf_reject_ipv6 i2c_algo_bit rng_core snd_pcm_dmaengine ttm snd_pcm drm_kms_helper snd_timer cec snd syscopyarea xt_hl sysfillrect sysimgblt
[  194.130748]  fb_sys_fops soundcore ip6t_rt wmi parport_pc parport pinctrl_amd gpio_amdpt video gpio_generic mac_hid nf_log_ipv4 nf_log_common ipt_REJECT nf_reject_ipv4 xt_LOG xt_limit xt_addrtype xt_tcpudp xt_conntrack ip6table_filter ip6_tables nf_conntrack_netbios_ns nf_conntrack_broadcast nf_nat_ftp nf_nat nf_conntrack_ftp nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 libcrc32c iptable_filter pkcs8_key_parser crypto_user drm fuse agpgart bpf_preload ip_tables x_tables ext4 crc32c_generic crc16 mbcache jbd2 hid_steam usbhid dm_mod crc32c_intel xhci_pci xhci_pci_renesas
[  194.130769] CPU: 0 PID: 113 Comm: kworker/u32:8 Tainted: G        W         5.10.8-arch1-1 #3
[  194.130770] Hardware name: Micro-Star International Co., Ltd. MS-7A34/B350 PC MATE (MS-7A34), BIOS A.J0 01/23/2019
[  194.130774] Workqueue: phy1 rt2x00usb_work_rxdone [rt2x00usb]
[  194.130776] RIP: 0010:usb_submit_urb+0x1c9/0x5e0
[  194.130777] Code: bc 24 a0 00 00 00 48 89 54 24 08 e8 41 c1 f3 ff 48 8b 54 24 08 45 89 f0 44 89 f9 48 89 c6 48 c7 c7 60 49 ff 96 e8 d1 9c 2c 00 <0f> 0b 83 e3 01 0f 85 f1 00 00 00 8b 74 24 04 48 83 c4 18 48 89 ef
[  194.130778] RSP: 0018:ffffb97d00777d70 EFLAGS: 00010282
[  194.130779] RAX: 0000000000000000 RBX: 0000000000000002 RCX: ffff9a5d0ec18bb8
[  194.130780] RDX: 00000000ffffffd8 RSI: 0000000000000027 RDI: ffff9a5d0ec18bb0
[  194.130780] RBP: ffff9a5a337980c0 R08: 0000000000000000 R09: ffffb97d00777ba8
[  194.130781] R10: ffffb97d00777ba0 R11: ffffffff976ca568 R12: ffff9a5a191a1800
[  194.130782] R13: 0000000000000002 R14: 0000000000000200 R15: 0000000001000200
[  194.130783] FS:  0000000000000000(0000) GS:ffff9a5d0ec00000(0000) knlGS:0000000000000000
[  194.130783] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  194.130784] CR2: 00007fb1c6c7e7c8 CR3: 000000011c504000 CR4: 00000000003506f0
[  194.130784] Call Trace:
[  194.130788]  rt2x00usb_kick_rx_entry+0xa3/0x110 [rt2x00usb]
[  194.130791]  rt2x00lib_rxdone+0x36b/0x5c0 [rt2x00lib]
[  194.130793]  rt2x00usb_work_rxdone+0x6d/0xb0 [rt2x00usb]
[  194.130796]  process_one_work+0x1d6/0x3a0
[  194.130798]  worker_thread+0x4d/0x3d0
[  194.130799]  ? rescuer_thread+0x410/0x410
[  194.130800]  kthread+0x133/0x150
[  194.130802]  ? __kthread_bind_mask+0x60/0x60
[  194.130804]  ret_from_fork+0x22/0x30
[  194.130806] ---[ end trace 11276ca464fe8927 ]---
Comment 159 Michael 2021-01-20 17:18:27 UTC
@ Stanislaw, may I ask a question?
I purchased the  RT5572 adapter several days before. It never worked due to the xhci issue. Now (after your help), it is working and we (with lots of your help) encountered a new issue. Affected combination exclusively
RT5572 - USB3 - xhci - rt2800usb
Should I report this issue?
If yes, is it a xhci issue or a rt2800usb issue?

@ Bernhard, I didn't notice this messages in combination with monitor mode - but I noticed them when running managed in combination with NetworkManager.
Comment 160 Stanislaw Gruszka 2021-01-21 09:34:10 UTC
Created attachment 294799 [details]
rt2800usb_no_soft_retry_v2.patch

This one should make "BOGUS urb flags" messages gone. Please test.

Patch is for 4.11-rc , perhaps for 4.10 it requires some changes.
Comment 161 Stanislaw Gruszka 2021-01-21 09:39:23 UTC
(In reply to Michael from comment #159)
> @ Stanislaw, may I ask a question?
> I purchased the  RT5572 adapter several days before. It never worked due to
> the xhci issue. Now (after your help), it is working and we (with lots of
> your help) encountered a new issue. Affected combination exclusively
> RT5572 - USB3 - xhci - rt2800usb
> Should I report this issue?
> If yes, is it a xhci issue or a rt2800usb issue?

Taking this happen only on some particular hardware, it can be driver, firmware or even hardware issue (both on rt2800usb or usb host). If you can find if this worked on some older kernel version and bisect it, you could report the issue, otherwise (without bisection) I do not see any chance to fix this problem.
Comment 162 Michael 2021-01-21 11:02:44 UTC
@ Stanislaw, thanks for your reply.
At this moment, there are too many screws that are turned.
First I'll wait until the "WARN Set TR Deq Ptr cmd failed" received a final fix. Than I'll dive into the driver code to find out, what is going wrong there.
Comment 163 Bernhard 2021-01-21 13:23:37 UTC
The last patch fixes the issue for me and the BOGUS messages are now gone too. Thanks
Comment 164 Michael 2021-01-21 15:34:48 UTC
patch v2 causes monitor mode to crash (on ioctl() system calls:

[  602.100650] usb 1-2: BOGUS urb flags, 208 --> 200
[  602.100691] WARNING: CPU: 10 PID: 15060 at drivers/usb/core/urb.c:517 usb_submit_urb+0x1c9/0x5e0
[  602.100692] Modules linked in: mt7601u rt2800usb(OE) rt2x00usb(OE) rt2800lib(OE) rt2x00lib(OE) mac80211 libarc4 nvidia_drm(POE) nvidia_modeset(POE) nvidia(POE) cfg80211 snd_hda_codec_realtek snd_hda_codec_generic snd_hda_codec_hdmi ledtrig_audio snd_hda_intel snd_intel_dspcfg rfkill soundwire_intel soundwire_generic_allocation soundwire_cadence 8021q snd_hda_codec garp mrp edac_mce_amd stp llc snd_hda_core snd_hwdep soundwire_bus r8169 snd_soc_core kvm realtek snd_compress nls_iso8859_1 ac97_bus snd_pcm_dmaengine vfat mdio_devres irqbypass mousedev crct10dif_pclmul fat ppdev snd_pcm crc32_pclmul ghash_clmulni_intel wmi_bmof mxm_wmi drm_kms_helper aesni_intel snd_timer cec ccp snd syscopyarea crypto_simd sysfillrect sp5100_tco cryptd usbhid sysimgblt glue_helper libphy soundcore fb_sys_fops pcspkr i2c_piix4 rng_core k10temp rapl parport_pc parport wmi pinctrl_amd gpio_amdpt gpio_generic mac_hid acpi_cpufreq drm sg fuse crypto_user agpgart bpf_preload ip_tables x_tables ext4 crc32c_generic
[  602.100876]  crc16 mbcache jbd2 crc32c_intel sr_mod xhci_pci cdrom xhci_pci_renesas
[  602.100879] CPU: 10 PID: 15060 Comm: hcxdumptool Tainted: P        W  OE     5.10.9-arch1-1 #1
[  602.100880] Hardware name: Micro-Star International Co., Ltd. MS-7A33/X370 KRAIT GAMING (MS-7A33), BIOS 1.F0 11/06/2018
[  602.100881] RIP: 0010:usb_submit_urb+0x1c9/0x5e0
[  602.100882] Code: bc 24 a0 00 00 00 48 89 54 24 08 e8 01 c1 f3 ff 48 8b 54 24 08 45 89 f0 44 89 f9 48 89 c6 48 c7 c7 f8 47 bf b9 e8 51 99 2c 00 <0f> 0b 83 e3 01 0f 85 f1 00 00 00 8b 74 24 04 48 83 c4 18 48 89 ef
[  602.100882] RSP: 0018:ffffb69648f5fb10 EFLAGS: 00010282
[  602.100883] RAX: 0000000000000000 RBX: 0000000000000002 RCX: ffff88a90ee98bb8
[  602.100884] RDX: 00000000ffffffd8 RSI: 0000000000000027 RDI: ffff88a90ee98bb0
[  602.100884] RBP: ffff88a60f3fb500 R08: 0000000000000000 R09: ffffb69648f5f948
[  602.100926] R10: ffffb69648f5f940 R11: ffffffffba2c0500 R12: ffff88a6152db800
[  602.100926] R13: 0000000000000002 R14: 0000000000000200 R15: 0000000000000208
[  602.100927] FS:  00007fef23ab0280(0000) GS:ffff88a90ee80000(0000) knlGS:0000000000000000
[  602.101008] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  602.101009] CR2: 00007fef2403eff8 CR3: 000000014b076000 CR4: 00000000003506e0
[  602.101050] Call Trace:
[  602.101132]  rt2x00usb_kick_rx_entry+0xa0/0x100 [rt2x00usb]
[  602.101175]  rt2x00queue_init_queues+0xb3/0x100 [rt2x00lib]
[  602.101257]  rt2x00lib_enable_radio+0x25/0xa0 [rt2x00lib]
[  602.101300]  rt2x00lib_start+0x7c/0xc0 [rt2x00lib]
[  602.101391]  drv_start+0x3d/0x100 [mac80211]
[  602.101444]  ieee80211_do_open+0x1c4/0x9c0 [mac80211]
[  602.101536]  ? ieee80211_check_concurrent_iface+0x14f/0x1c0 [mac80211]
[  602.101577]  __dev_open+0xfb/0x1b0
[  602.101658]  __dev_change_flags+0x1a6/0x210
[  602.101699]  ? enqueue_task_fair+0x8a/0x5d0
[  602.101780]  dev_change_flags+0x21/0x60
[  602.101821]  devinet_ioctl+0x641/0x810
[  602.101823]  ? preempt_schedule_thunk+0x16/0x18
[  602.101904]  inet_ioctl+0x1d7/0x210
[  602.102026]  sock_do_ioctl+0x82/0x180
[  602.102067]  sock_ioctl+0x272/0x3e0
[  602.102068]  __x64_sys_ioctl+0x83/0xb0
[  602.102150]  do_syscall_64+0x33/0x40
[  602.102191]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[  602.102272] RIP: 0033:0x7fef23bcff6b
[  602.102273] Code: 89 d8 49 8d 3c 1c 48 f7 d8 49 39 c4 72 b5 e8 1c ff ff ff 85 c0 78 ba 4c 89 e0 5b 5d 41 5c c3 f3 0f 1e fa b8 10 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d d5 ae 0c 00 f7 d8 64 89 01 48
[  602.102314] RSP: 002b:00007ffecf9e65a8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[  602.102315] RAX: ffffffffffffffda RBX: 000055f706b51d18 RCX: 00007fef23bcff6b
[  602.102396] RDX: 000055f706bce140 RSI: 0000000000008914 RDI: 0000000000000003
[  602.102396] RBP: 00007ffecf9e6620 R08: 0000000000000004 R09: 0032753066307333
[  602.102437] R10: 0000000000000020 R11: 0000000000000246 R12: 0000000000000004
[  602.102438] R13: 00007ffecf9e6718 R14: 0000000000000000 R15: 0000000000000000
[  602.102519] ---[ end trace 42333ce669cb71ea ]---
[  607.450006] device wlp3s0f0u2 left promiscuous mode
Comment 165 Stanislaw Gruszka 2021-01-22 07:48:41 UTC
(In reply to Michael from comment #164)
> patch v2 causes monitor mode to crash (on ioctl() system calls:
> 
> [  602.100650] usb 1-2: BOGUS urb flags, 208 --> 200
> [  602.100691] WARNING: CPU: 10 PID: 15060 at drivers/usb/core/urb.c:517
> usb_submit_urb+0x1c9/0x5e0
[snip]
> [  602.100879] CPU: 10 PID: 15060 Comm: hcxdumptool Tainted: P        W  OE 
> 5.10.9-arch1-1 #1

Those are same "BOGUS urb flags" messages like reported before by Bernhard. I think you did not correctly apply v2 patch on top of 5.10. Please double check if this hunk is present on your backported patch:

diff --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c
index 357b149b20d3..140bac59dc32 100644
--- a/drivers/usb/core/urb.c
+++ b/drivers/usb/core/urb.c
@@ -495,7 +495,7 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags)

        /* Check against a simple/standard policy */
        allowed = (URB_NO_TRANSFER_DMA_MAP | URB_NO_INTERRUPT | URB_DIR_MASK |
-                       URB_FREE_BUFFER);
+                  URB_SOFT_RETRY_NOT_OK | URB_FREE_BUFFER);
        switch (xfertype) {
        case USB_ENDPOINT_XFER_BULK:
        case USB_ENDPOINT_XFER_INT:
Comment 166 Michael 2021-01-22 08:26:24 UTC
 The patch was applied to urb.c (5.10.9):
	/* Check against a simple/standard policy */
	allowed = (URB_NO_TRANSFER_DMA_MAP | URB_NO_INTERRUPT | URB_DIR_MASK |
		   URB_SOFT_RETRY_NOT_OK | URB_FREE_BUFFER);
	switch (xfertype) {
	case USB_ENDPOINT_XFER_BULK:
	case USB_ENDPOINT_XFER_INT:

At this moment, I don't know what exactly went wrong. I'll try to identify the issue.
Comment 167 Stanislaw Gruszka 2021-01-22 09:19:40 UTC
Maybe usb layer was compiled in the kernel and you only reload modules.
Comment 168 Michael 2021-01-22 09:26:36 UTC
Thanks. Now the modules are loaded correctly and the BOGUS messages disappeared.

Unfortunately monitor mode is not working with v2:
ID 148f:5370 Ralink Technology, Corp. RT5370 Wireless Adapter

before:
$ sudo hcxdumptool -i wlp3s0f0u2 --check_injection
initialization...
starting antenna test and packet injection test (that can take up to two minutes)...
available channels: 1,2,3,4,5,6,7,8,9,10,11,12,13,14
packet injection is working on 2.4GHz!
injection ratio: 54% (BEACON: 123 PROBERESPONSE: 67)
your injection ratio is good
antenna ratio: 45% (NETWORK: 20 PROBERESPONSE: 9)
your antenna ratio is average, but there is still room for improvement

terminating...

after v2:
$ sudo hcxdumptool -i wlp3s0f0u2 --check_injection
initialization...
starting antenna test and packet injection test (that can take up to two minutes)...
available channels: 1,2,3,4,5,6,7,8,9,10,11,12,13,14
warning: no PROBERESPONSE received - packet injection is probably not working!
8 driver errors encountered during the test

terminating...
Comment 169 Stanislaw Gruszka 2021-01-22 09:44:03 UTC
Michael, at this point I really doubt about reliability of your testing.
Comment 170 Michael 2021-01-22 09:49:34 UTC
Stanislaw, and you're not the only one. I doubt it, too.
Maybe I patched my kernel to death and it is time for me to compile a fresh one.
But anyway, thanks for your effort an for your patience.
Comment 171 Michael 2021-01-22 10:00:11 UTC
Stanislaw, short notice for you. Now, I'm running the fresh kernel (the RYZEN is really fast compiling it). Patch v2 is applied.
Everything is working fine and all Bogus messages are gone.
Thanks again.
Comment 172 WGH 2021-01-29 17:09:47 UTC
(In reply to Mathias Nyman from comment #139)
> rewritten URB cancel, endpoint stop and set trb deq can be found in my tree
> in rewrite_halt_stop_handling branch
> 
> git://git.kernel.org/pub/scm/linux/kernel/git/mnyman/xhci.git
> rewrite_halt_stop_handling  
> 
> https://git.kernel.org/pub/scm/linux/kernel/git/mnyman/xhci.git/log/
> ?h=rewrite_halt_stop_handling
> 
> Does that help?

I applied the patch to 5.10.11-gentoo, and it did help with my HackRF One (see comment #136 for details and hardware)! No ill effects so far.
Comment 173 Stanislaw Gruszka 2021-02-03 09:11:58 UTC
After discussion on my posted patch here:

https://lore.kernel.org/linux-usb/20210122104342.12451-1-stf_xl@wp.pl/t/#u

it was concluded that this should be rather be xhci quirk instead of rt2800usb driver flag.

If change from comment 147 help for you with the problem, please provide PCI-id of your xHCI controller. This can be done by command:

lspci -k -nn | grep -B2 xhci 

If you have more than one xHCI controller please assure you provide PCI-id's of one that actually has the problem ('lspci -t' command can be useful as well)
Comment 174 Stanislaw Gruszka 2021-02-03 09:13:37 UTC
(In reply to Stanislaw Gruszka from comment #173)
> If you have more than one xHCI controller please assure you provide PCI-id's
> of one that actually has the problem ('lspci -t' command can be useful as
> well)

I meant 'lsusb -t'
Comment 175 Michael 2021-02-03 09:54:18 UTC
USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] X370 Series Chipset USB 3.1 xHCI Controller [1022:43b9] (rev 02)
Subsystem: ASMedia Technology Inc. Device [1b21:1142]
Kernel driver in use: xhci_hcd
Kernel modules: xhci_pci
Comment 176 Stanislaw Gruszka 2021-02-03 13:01:38 UTC
Created attachment 295055 [details]
0001-usb-xhci-do-not-perform-Soft-Retry-for-some-xHCI-hos.patch

This is next proposed fix. It suppose to disable Soft Retry for affected xHCI controllers. Currently only for xHCI device reported by Michael:
PCI_VENDOR_ID_AMD = 0x1022 , PCI_DEVICE_ID_AMD_PROMONTORYA_4 = 0x43b9

If you want to test and have different xHCI host you need to add your PCI-id's to 
drivers/usb/host/xhci-pci.c part of the patch.
Comment 177 Michael 2021-02-03 13:46:33 UTC
@Stanislaw, I followed the discussion you mentioned here:
https://bugzilla.kernel.org/show_bug.cgi?id=202541#c173

Other devices than rt2800usb devices are affected, too.
Tested this one before applying your patch:
ID 7392:7710 Edimax Technology Co., Ltd Edimax Wi-Fi
and running into the same xhci issue  on USB controller mentioned here:
https://bugzilla.kernel.org/show_bug.cgi?id=202541#c175

[10214.423508] usb 1-2: new high-speed USB device number 3 using xhci_hcd
[10214.602833] usb 1-2: New USB device found, idVendor=7392, idProduct=7710, bcdDevice= 0.00
[10214.602838] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[10214.602841] usb 1-2: Product: Edimax Wi-Fi
[10214.602843] usb 1-2: Manufacturer: MediaTek
[10214.602845] usb 1-2: SerialNumber: 1.0
[10214.931553] usb 1-2: reset high-speed USB device number 3 using xhci_hcd
[10215.102895] mt7601u 1-2:1.0: ASIC revision: 76010001 MAC revision: 76010500
[10215.132670] mt7601u 1-2:1.0: Firmware Version: 0.1.00 Build: 7640 Build time: 201302052146____
[10216.101346] mt7601u 1-2:1.0: EEPROM ver:0d fae:00
[10216.111983] mt7601u 1-2:1.0: EEPROM country region 01 (channels 1-13)
[10217.189574] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[10217.190361] usbcore: registered new interface driver mt7601u
[10217.199429] mt7601u 1-2:1.0 wlp3s0f0u2: renamed from wlan0
[10296.419053] xhci_hcd 0000:03:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
[10296.419228] xhci_hcd 0000:03:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
Comment 178 alpir 2021-02-03 13:55:24 UTC
The same problem (with ID 04a9:220d Canon, Inc. CanoScan N670U/N676U/LiDE 20):

Feb 03 09:48:54 [kernel] [34974.104606] xhci_hcd 0000:01:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
Feb 03 09:49:49 [kernel] [35029.419748] usb 1-6: USB disconnect, device number 3
Feb 03 09:49:52 [kernel] [35031.994403] usb 1-6: new full-speed USB device number 6 using xhci_hcd
Feb 03 09:50:45 [kernel] [35085.400634] xhci_hcd 0000:01:00.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
Feb 03 09:50:45 [kernel] [35085.404278] xhci_hcd 0000:01:00.0: WARN Successful completion on short TX
Feb 03 09:50:45 [kernel] [35085.404398] xhci_hcd 0000:01:00.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 4 comp_code 1
Feb 03 09:50:45 [kernel] [35085.404401] xhci_hcd 0000:01:00.0: Looking for event-dma 00000008146ff050 trb-start 00000008146ff060 trb-end 00000008146ff060 seg-start 00000008146ff000 seg-end 00000008146ffff0

$  lspci -k -nn | grep -B2 xhci
00:18.6 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 6 [1022:1466]
00:18.7 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 00h-0fh) Data Fabric: Device 18h; Function 7 [1022:1467]
01:00.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset USB 3.1 XHCI Controller [1022:43d5] (rev 01)
	Subsystem: ASMedia Technology Inc. 400 Series Chipset USB 3.1 XHCI Controller [1b21:1142]
	Kernel driver in use: xhci_hcd
--
09:00.2 USB controller [0c03]: NVIDIA Corporation TU116 USB 3.1 Host Controller [10de:1aec] (rev a1)
	Subsystem: NVIDIA Corporation TU116 USB 3.1 Host Controller [10de:139d]
	Kernel driver in use: xhci_hcd
--
0a:00.3 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] Zeppelin USB 3.0 Host controller [1022:145f]
	Subsystem: Advanced Micro Devices, Inc. [AMD] Zeppelin USB 3.0 Host controller [1022:7914]
	Kernel driver in use: xhci_hcd

$  uname -a
Linux Gentoo 5.4.92-gentoo #1 SMP PREEMPT Thu Jan 28 20:45:52 MSK 2021 x86_64 AMD Ryzen 5 2600 Six-Core Processor AuthenticAMD GNU/Linux
Comment 179 Stanislaw Gruszka 2021-02-03 14:24:44 UTC
(In reply to Michael from comment #177)
> Other devices than rt2800usb devices are affected, too.
> Tested this one before applying your patch:
> ID 7392:7710 Edimax Technology Co., Ltd Edimax Wi-Fi
> and running into the same xhci issue  on USB controller mentioned here:
> https://bugzilla.kernel.org/show_bug.cgi?id=202541#c175

Ok, so it makes sense to disable Soft Retry per xHCI.
Comment 180 Stanislaw Gruszka 2021-02-03 14:28:06 UTC
(In reply to alpir from comment #178)
> The same problem (with ID 04a9:220d Canon, Inc. CanoScan N670U/N676U/LiDE
> 20):
> 
> Feb 03 09:48:54 [kernel] [34974.104606] xhci_hcd 0000:01:00.0: WARN Set TR
> Deq Ptr cmd failed due to incorrect slot or ep state.

alpir, does the change from comment 147 help for you ?
Comment 181 Stanislaw Gruszka 2021-02-03 15:27:05 UTC
alpir, you have different device-id than Michael, but you both have the same subsytem device: ASMedia 1b21:1142. So perhaps patch should be based on subdevice id's. Let's wait for other users reports regarding xHCI controller, we will see then.
Comment 182 alpir 2021-02-03 15:43:01 UTC
I tried patch from comment 147. The error "WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state" has gone. But behavior USDB3.1 still the same.

Why did I even start looking for the reason for the strange behavior of OSD ports: two my JetFlash Transcend 8GB flash drives connected to the USB3 port is sometimes not detected by the system as being mountable (fat32). When I run a disk check (8 Gb) with the command badblocks -nvs / dev / sdd, then after a while the check ends with the following error: Pass completed, 5662144 bad blocks found. (5662144/0/0 errors). And both flash drives.

But if you connect them to USB2, then there are no errors at all.

At the same time, when looking at the logs, I found errors: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.

Now, after patch, i get next in logs:

Feb 03 17:47:14 [kernel] [   52.603587] usb 2-3: new SuperSpeed Gen 1 USB device number 2 using xhci_hcd
Feb 03 17:47:14 [kernel] [   52.636130] usb-storage 2-3:1.0: USB Mass Storage device detected
Feb 03 17:47:14 [kernel] [   52.636242] scsi host11: usb-storage 2-3:1.0
Feb 03 17:47:14 [kernel] [   52.651996] usbcore: registered new interface driver uas
Feb 03 17:47:16 [kernel] [   54.013780] scsi 11:0:0:0: Direct-Access     JetFlash Transcend 8GB    1100 PQ: 0 ANSI: 6
Feb 03 17:47:16 [kernel] [   54.014688] sd 11:0:0:0: [sdd] 15425536 512-byte logical blocks: (7.90 GB/7.36 GiB)
Feb 03 17:47:16 [kernel] [   54.015150] sd 11:0:0:0: [sdd] Write Protect is off
Feb 03 17:47:16 [kernel] [   54.015156] sd 11:0:0:0: [sdd] Mode Sense: 43 00 00 00
Feb 03 17:47:16 [kernel] [   54.015625] sd 11:0:0:0: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Feb 03 17:47:16 [kernel] [   54.028165]  sdd: sdd1
Feb 03 17:47:16 [kernel] [   54.045687] sd 11:0:0:0: [sdd] Attached SCSI removable disk
Feb 03 17:48:04 [kernel] [  102.221862] usb 2-3: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd
Feb 03 17:51:52 [kernel] [  330.009696] usb 2-3: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd
Feb 03 17:55:55 [kernel] [  573.644576] usb 2-3: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd
Feb 03 17:56:01 [kernel] [  579.149875] usb 2-3: device descriptor read/8, error -110
Feb 03 17:56:01 [kernel] [  579.254204] usb 2-3: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd
Feb 03 17:56:06 [kernel] [  584.781836] usb 2-3: device descriptor read/8, error -110
Feb 03 17:56:07 [kernel] [  585.073435] usb 2-3: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd
Feb 03 17:56:12 [kernel] [  590.413816] usb 2-3: device descriptor read/8, error -110
Feb 03 17:56:12 [kernel] [  590.518146] usb 2-3: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd
Feb 03 17:56:18 [kernel] [  596.046034] usb 2-3: device descriptor read/8, error -110
Feb 03 17:56:18 [kernel] [  596.336445] usb 2-3: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd
Feb 03 17:56:23 [kernel] [  601.677932] usb 2-3: device descriptor read/8, error -110
Feb 03 17:56:23 [kernel] [  601.782091] usb 2-3: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd
Feb 03 17:56:29 [kernel] [  607.309722] usb 2-3: device descriptor read/8, error -110
Feb 03 17:56:29 [kernel] [  607.598490] usb 2-3: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd
Feb 03 17:56:35 [kernel] [  612.941883] usb 2-3: device descriptor read/8, error -110
Feb 03 17:56:35 [kernel] [  613.046062] usb 2-3: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd
Feb 03 17:56:40 [kernel] [  618.573664] usb 2-3: device descriptor read/8, error -110
Feb 03 17:56:40 [kernel] [  618.694297] usb 2-3: USB disconnect, device number 2
Feb 03 17:56:40 [kernel] [  618.702083] blk_update_request: I/O error, dev sdd, sector 4101248 op 0x0:(READ) flags 0x0 phys_seg 16 prio class 0
Feb 03 17:56:40 [kernel] [  618.702241] blk_update_request: I/O error, dev sdd, sector 4101248 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
Feb 03 17:56:40 [kernel] [  618.702275] blk_update_request: I/O error, dev sdd, sector 4101248 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
Feb 03 17:56:40 [kernel] [  618.702280] Buffer I/O error on dev sdd, logical block 512656, async page read
Feb 03 17:56:40 [kernel] [  618.702318] blk_update_request: I/O error, dev sdd, sector 4101248 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
Feb 03 17:56:40 [kernel] [  618.702343] blk_update_request: I/O error, dev sdd, sector 4101248 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
Feb 03 17:56:40 [kernel] [  618.702346] Buffer I/O error on dev sdd, logical block 512656, async page read
Feb 03 17:56:40 [kernel] [  618.702376] blk_update_request: I/O error, dev sdd, sector 4101248 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
Feb 03 17:56:40 [kernel] [  618.702401] blk_update_request: I/O error, dev sdd, sector 4101248 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
Feb 03 17:56:40 [kernel] [  618.702403] Buffer I/O error on dev sdd, logical block 512656, async page read
Feb 03 17:56:40 [kernel] [  618.702434] blk_update_request: I/O error, dev sdd, sector 4101248 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
Feb 03 17:56:40 [kernel] [  618.702463] blk_update_request: I/O error, dev sdd, sector 4101256 op 0x0:(READ) flags 0x0 phys_seg 15 prio class 0
Feb 03 17:56:40 [kernel] [  618.702494] Buffer I/O error on dev sdd, logical block 512657, async page read
Feb 03 17:56:40 [kernel] [  618.702509] Buffer I/O error on dev sdd, logical block 512657, async page read
Feb 03 17:56:40 [kernel] [  618.702521] Buffer I/O error on dev sdd, logical block 512657, async page read
Feb 03 17:56:40 [kernel] [  618.702597] Buffer I/O error on dev sdd, logical block 512659, async page read
Feb 03 17:56:41 [kernel] [  618.892181] usb 2-3: new SuperSpeed Gen 1 USB device number 3 using xhci_hcd
Feb 03 17:56:45 [kernel] [  623.702972] buffer_io_error: 2070133 callbacks suppressed
Feb 03 17:56:45 [kernel] [  623.702975] Buffer I/O error on dev sdd, logical block 1030195, async page read
Feb 03 17:56:45 [kernel] [  623.702979] Buffer I/O error on dev sdd, logical block 1030196, async page read
Feb 03 17:56:45 [kernel] [  623.702983] Buffer I/O error on dev sdd, logical block 1030196, async page read
Feb 03 17:56:45 [kernel] [  623.702986] Buffer I/O error on dev sdd, logical block 1030196, async page read
Feb 03 17:56:45 [kernel] [  623.702988] Buffer I/O error on dev sdd, logical block 1030196, async page read
Feb 03 17:56:45 [kernel] [  623.702991] Buffer I/O error on dev sdd, logical block 1030197, async page read
Feb 03 17:56:45 [kernel] [  623.702993] Buffer I/O error on dev sdd, logical block 1030197, async page read
Feb 03 17:56:45 [kernel] [  623.702995] Buffer I/O error on dev sdd, logical block 1030197, async page read
Feb 03 17:56:45 [kernel] [  623.702997] Buffer I/O error on dev sdd, logical block 1030197, async page read
Feb 03 17:56:45 [kernel] [  623.703000] Buffer I/O error on dev sdd, logical block 1030198, async page read
Feb 03 17:56:46 [kernel] [  624.205633] usb 2-3: device descriptor read/8, error -110
Feb 03 17:56:46 [kernel] [  624.309977] usb 2-3: new SuperSpeed Gen 1 USB device number 3 using xhci_hcd
Feb 03 17:56:50 [kernel] [  628.703937] buffer_io_error: 2089117 callbacks suppressed
Feb 03 17:56:50 [kernel] [  628.703939] Buffer I/O error on dev sdd, logical block 1552477, async page read
Feb 03 17:56:50 [kernel] [  628.703942] Buffer I/O error on dev sdd, logical block 1552477, async page read
Feb 03 17:56:50 [kernel] [  628.703945] Buffer I/O error on dev sdd, logical block 1552478, async page read
Feb 03 17:56:50 [kernel] [  628.703948] Buffer I/O error on dev sdd, logical block 1552478, async page read
Feb 03 17:56:50 [kernel] [  628.703950] Buffer I/O error on dev sdd, logical block 1552478, async page read
Feb 03 17:56:50 [kernel] [  628.703953] Buffer I/O error on dev sdd, logical block 1552478, async page read
Feb 03 17:56:50 [kernel] [  628.703955] Buffer I/O error on dev sdd, logical block 1552479, async page read
Feb 03 17:56:50 [kernel] [  628.703958] Buffer I/O error on dev sdd, logical block 1552479, async page read
Feb 03 17:56:50 [kernel] [  628.703960] Buffer I/O error on dev sdd, logical block 1552479, async page read
Feb 03 17:56:50 [kernel] [  628.703963] Buffer I/O error on dev sdd, logical block 1552479, async page read
Feb 03 17:56:51 [kernel] [  629.838589] usb 2-3: device descriptor read/8, error -110
Feb 03 17:56:52 [kernel] [  630.129112] usb 2-3: new SuperSpeed Gen 1 USB device number 4 using xhci_hcd
Feb 03 17:56:57 [kernel] [  635.469561] usb 2-3: device descriptor read/8, error -110
Feb 03 17:56:57 [kernel] [  635.573925] usb 2-3: new SuperSpeed Gen 1 USB device number 4 using xhci_hcd
Feb 03 17:57:03 [kernel] [  641.101804] usb 2-3: device descriptor read/8, error -110
Feb 03 17:57:03 [kernel] [  641.214076] usb usb2-port3: attempt power cycle
Feb 03 17:57:04 [kernel] [  642.323012] usb 2-3: new SuperSpeed Gen 1 USB device number 5 using xhci_hcd
Feb 03 17:57:09 [kernel] [  647.757472] usb 2-3: device descriptor read/8, error -110
Feb 03 17:57:09 [kernel] [  647.861845] usb 2-3: new SuperSpeed Gen 1 USB device number 5 using xhci_hcd
Feb 03 17:57:15 [kernel] [  653.390427] usb 2-3: device descriptor read/8, error -110
Feb 03 17:57:15 [kernel] [  653.680943] usb 2-3: new SuperSpeed Gen 1 USB device number 6 using xhci_hcd
Feb 03 17:57:21 [kernel] [  659.022390] usb 2-3: device descriptor read/8, error -110
Feb 03 17:57:21 [kernel] [  659.125736] usb 2-3: new SuperSpeed Gen 1 USB device number 6 using xhci_hcd
Feb 03 17:57:26 [kernel] [  664.653379] usb 2-3: device descriptor read/8, error -110
Feb 03 17:57:26 [kernel] [  664.765744] usb usb2-port3: unable to enumerate USB device
Comment 183 Bernhard 2021-02-03 16:13:06 UTC
My controller has the PCI ID 43bb, so I've added "PCI_DEVICE_ID_AMD_PROMONTORYA_2" to the patch from #176, and that fixed the issue for me.
Comment 184 Michael 2021-02-03 16:37:52 UTC
@Stanislaw, I'm running an older mobo and a RYZEN 1700.
I don't need CPU power - GPU power is more important for me (crypto analysis).
Comment 185 biopsin 2021-02-04 08:01:25 UTC
[Continuing my first report in comment:https://bugzilla.kernel.org/show_bug.cgi?id=202541#c107]

$ lspci -k -nn | grep -B2 xhci
02:00.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] 400 Series Chipset USB 3.1 XHCI Controller [1022:43d5] (rev 01)
        Subsystem: ASMedia Technology Inc. Device [1b21:1142]
        Kernel driver in use: xhci_hcd

I have adapted the patch by Mr. Gruszka [https://bugzilla.kernel.org/show_bug.cgi?id=202541#c176] for my current system and needs

$ uname -a
Linux voidx 5.4.95_1 #1 SMP PREEMPT 1612063540 x86_64 GNU/Linux

If someone has some spare time to glance at it or comment on my error ;)
(diff availible for 30 days) @
https://p.teknik.io/lIBbA
Comment 186 Stanislaw Gruszka 2021-02-04 09:41:33 UTC
(In reply to alpir from comment #182)
> I tried patch from comment 147. The error "WARN Set TR Deq Ptr cmd failed
> due to incorrect slot or ep state" has gone. But behavior USDB3.1 still the
> same.
[snip]
> But if you connect them to USB2, then there are no errors at all.

alpir, I think you experiencing different issue that can not be solved by simply disabling Soft Retry. Some more fixes are possibly needed for handing your xHCI/usb hardware. Maybe you can try patch from comment 139? If this is regression, maybe you can bisect to find offending commit? Anyway your problems, most likely will require expertise of Mathias Nyman - xhci driver maintainer.
Comment 187 Stanislaw Gruszka 2021-02-04 09:50:48 UTC
(In reply to biopsin from comment #185)
> [Continuing my first report in
> comment:https://bugzilla.kernel.org/show_bug.cgi?id=202541#c107]

Similarly like for as for alpir case this most likely will require some different fixes, but you can try if disabling Soft Retry works. You can just disable like showed in comment 147

 > $ lspci -k -nn | grep -B2 xhci
> 02:00.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] 400 Series
> Chipset USB 3.1 XHCI Controller [1022:43d5] (rev 01)
>         Subsystem: ASMedia Technology Inc. Device [1b21:1142]
>         Kernel driver in use: xhci_hcd
> 
[snip]
> If someone has some spare time to glance at it or comment on my error ;)
> (diff availible for 30 days) @
> https://p.teknik.io/lIBbA

ASMedia is subsystem_{vendor,device) so most likely quirk flag is not set properly for you. You can print values by patch like this to see:

diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
index 906a0e08821e..0ec9c3637b7a 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -102,6 +102,9 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
 
        id = pci_match_id(pdev->driver->id_table, pdev);
 
+       printk("vendor: 0x%04x device 0x%04x subvendor 0x%04x subdevice 0x%04x\n",
+              pdev->vendor, pdev->device, pdev->subsystem_vendor, pdev->subsystem_device);
+
        if (id && id->driver_data) {
                driver_data = (struct xhci_driver_data *)id->driver_data;
                xhci->quirks |= driver_data->quirks;

If indeed those are subsystem ID's I think there is bug in existing xhci-pci.c quirks code: 

        if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
                pdev->device == PCI_DEVICE_ID_ASMEDIA_1042_XHCI)
                xhci->quirks |= XHCI_BROKEN_STREAMS;
        if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
                pdev->device == PCI_DEVICE_ID_ASMEDIA_1042A_XHCI)
                xhci->quirks |= XHCI_TRUST_TX_LENGTH;
        if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
            (pdev->device == PCI_DEVICE_ID_ASMEDIA_1142_XHCI ||
             pdev->device == PCI_DEVICE_ID_ASMEDIA_2142_XHCI))
                xhci->quirks |= XHCI_NO_64BIT_SUPPORT

and those check should be replaced by pdev->subsystem_vendor and pdev->subsystem_device.
Comment 188 Stanislaw Gruszka 2021-02-04 10:09:54 UTC
Created attachment 295065 [details]
asmedia_subsytem_quirks.patch

This patch apply existing xhci ASMedia quirks also for ASMedia subdevices .

Looking into changelog history those quirks helped with some usb disk issues, so perhaps patch could help with disk issues reported here i.e. alpir and biopsin cases. Please test.
Comment 189 alpir 2021-02-04 10:28:23 UTC
None of the patches (comments 139, 147, 188) did not solve my problem.
Comment 190 biopsin 2021-02-05 08:44:34 UTC
@Gruszka 
Your patch [https://bugzilla.kernel.org/show_bug.cgi?id=202541#c188] makes very mutch sense, thank you.
I'm currently testing it with my setup and kernel 5.4.95_x86_64.
Tested against one PATA and one SATA drives, so far I see no ill effects, but I also can't confirm or deny it does anything with this short timespan, and much have change since my initial post last year. I will at least continuing applying it now and then out this year and report any newsworthy. Thank you for your time and help!
Comment 191 raul 2021-02-09 13:43:44 UTC
Created attachment 295151 [details]
Dmesg of a Toshiba USB 3.0 HDD connected to USB 3.0 front port and back port.

I am having this error on Linux 5.10.10-051010 while trying to connect a USB 3.0 hard disk, Toshiba Touro 4TB (HitachiGST). If I connect the disk to a USB 2.0 port it works flawlessly.

The kernel shows a different kind of error depending on whether I connect the HDD to the front or back USB 3.0 ports of the motherboard MSI X470 Gaming Plus MAX.

lspci -vnnt:
> -[0000:00]-+-00.0  Advanced Micro Devices, Inc. [AMD] Family 17h (Models
> 00h-0fh) Root Complex [1022:1450]
>            +-00.2  Advanced Micro Devices, Inc. [AMD] Family 17h (Models
>            00h-0fh) I/O Memory Management Unit [1022:1451]
>            +-01.0  Advanced Micro Devices, Inc. [AMD] Family 17h (Models
>            00h-1fh) PCIe Dummy Host Bridge [1022:1452]
>            +-01.1-[01]----00.0  Samsung Electronics Co Ltd NVMe SSD
>            Controller SM981/PM981/PM983 [144d:a808]
>            +-01.3-[03-26]--+-00.0  Advanced Micro Devices, Inc. [AMD] Device
>            [1022:43d0]
>            |               +-00.1  Advanced Micro Devices, Inc. [AMD] 400
>            Series Chipset SATA Controller [1022:43c8]
>            |               \-00.2-[20-26]--+-00.0-[21]--
>            |                               +-01.0-[22]----00.0  Realtek
>            Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit
>            Ethernet Controller [10ec:8168]
>            |                               +-02.0-[23]--
>            |                               +-03.0-[24]--
>            |                               +-04.0-[25]--
>            |                               \-08.0-[26]----00.0  ASMedia
>            Technology Inc. ASM1142 USB 3.1 Host Controller [1b21:1242]
>            +-02.0  Advanced Micro Devices, Inc. [AMD] Family 17h (Models
>            00h-1fh) PCIe Dummy Host Bridge [1022:1452]
>            +-03.0  Advanced Micro Devices, Inc. [AMD] Family 17h (Models
>            00h-1fh) PCIe Dummy Host Bridge [1022:1452]
>            +-03.1-[27]--+-00.0  Advanced Micro Devices, Inc. [AMD/ATI]
>            Ellesmere [Radeon RX 470/480/570/570X/580/580X/590] [1002:67df]
>            |            \-00.1  Advanced Micro Devices, Inc. [AMD/ATI]
>            Ellesmere HDMI Audio [Radeon RX 470/480 / 570/580/590] [1002:aaf0]
>            +-04.0  Advanced Micro Devices, Inc. [AMD] Family 17h (Models
>            00h-1fh) PCIe Dummy Host Bridge [1022:1452]
>            +-07.0  Advanced Micro Devices, Inc. [AMD] Family 17h (Models
>            00h-1fh) PCIe Dummy Host Bridge [1022:1452]
>            +-07.1-[28]--+-00.0  Advanced Micro Devices, Inc. [AMD]
>            Zeppelin/Raven/Raven2 PCIe Dummy Function [1022:145a]
>            |            +-00.2  Advanced Micro Devices, Inc. [AMD] Family 17h
>            (Models 00h-0fh) Platform Security Processor [1022:1456]
>            |            \-00.3  Advanced Micro Devices, Inc. [AMD] Zeppelin
>            USB 3.0 Host controller [1022:145f]
>            +-08.0  Advanced Micro Devices, Inc. [AMD] Family 17h (Models
>            00h-1fh) PCIe Dummy Host Bridge [1022:1452]
>            +-08.1-[29]--+-00.0  Advanced Micro Devices, Inc. [AMD]
>            Zeppelin/Renoir PCIe Dummy Function [1022:1455]
>            |            +-00.2  Advanced Micro Devices, Inc. [AMD] FCH SATA
>            Controller [AHCI mode] [1022:7901]
>            |            \-00.3  Advanced Micro Devices, Inc. [AMD] Family 17h
>            (Models 00h-0fh) HD Audio Controller [1022:1457]
>            +-14.0  Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller
>            [1022:790b]
>            +-14.3  Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge
>            [1022:790e]
>            +-18.0  Advanced Micro Devices, Inc. [AMD] Family 17h (Models
>            00h-0fh) Data Fabric: Device 18h; Function 0 [1022:1460]
>            +-18.1  Advanced Micro Devices, Inc. [AMD] Family 17h (Models
>            00h-0fh) Data Fabric: Device 18h; Function 1 [1022:1461]
>            +-18.2  Advanced Micro Devices, Inc. [AMD] Family 17h (Models
>            00h-0fh) Data Fabric: Device 18h; Function 2 [1022:1462]
>            +-18.3  Advanced Micro Devices, Inc. [AMD] Family 17h (Models
>            00h-0fh) Data Fabric: Device 18h; Function 3 [1022:1463]
>            +-18.4  Advanced Micro Devices, Inc. [AMD] Family 17h (Models
>            00h-0fh) Data Fabric: Device 18h; Function 4 [1022:1464]
>            +-18.5  Advanced Micro Devices, Inc. [AMD] Family 17h (Models
>            00h-0fh) Data Fabric: Device 18h; Function 5 [1022:1465]
>            +-18.6  Advanced Micro Devices, Inc. [AMD] Family 17h (Models
>            00h-0fh) Data Fabric: Device 18h; Function 6 [1022:1466]
>            \-18.7  Advanced Micro Devices, Inc. [AMD] Family 17h (Models
>            00h-0fh) Data Fabric: Device 18h; Function 7 [1022:1467]

lsusb -vt:
> /:  Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
>     ID 1d6b:0003 Linux Foundation 3.0 root hub
>     |__ Port 3: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
>         ID 4971:1015 SimpleTech 
> /:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
>     ID 1d6b:0002 Linux Foundation 2.0 root hub
> /:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 10000M
>     ID 1d6b:0003 Linux Foundation 3.0 root hub
> /:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
>     ID 1d6b:0002 Linux Foundation 2.0 root hub
> /:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/8p, 10000M
>     ID 1d6b:0003 Linux Foundation 3.0 root hub
> /:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/14p, 480M
>     ID 1d6b:0002 Linux Foundation 2.0 root hub
>     |__ Port 4: Dev 2, If 0, Class=Vendor Specific Class,
>     Driver=dvb_usb_af9035, 480M
>         ID 07ca:1835 AVerMedia Technologies, Inc. 
>     |__ Port 12: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid,
>     1.5M
>         ID 04d9:1818 Holtek Semiconductor, Inc. Keyboard [Diatec Filco
>         Majestouch 2]
>     |__ Port 12: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid,
>     1.5M
>         ID 04d9:1818 Holtek Semiconductor, Inc. Keyboard [Diatec Filco
>         Majestouch 2]
>     |__ Port 13: Dev 4, If 1, Class=Human Interface Device, Driver=usbhid,
>     12M
>         ID 046d:c066 Logitech, Inc. G9x Laser Mouse
>     |__ Port 13: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid,
>     12M
>         ID 046d:c066 Logitech, Inc. G9x Laser Mouse
Comment 192 raul 2021-02-10 13:48:50 UTC
Created attachment 295183 [details]
Dmesg of a OnePlus 7 Pro connecting in USB 3.1 gen1 mode. No errors.

(In reply to raul from comment #191)
Connecting a Oneplus 7 Pro smartphone does show any error. This phone has a USB 3.1 gen1 port and connects in that mode without errors. I can navigate the filesystem as one would expect.
Comment 193 Zak 2021-03-27 12:15:20 UTC
Same issue with a Seagate Portable 4 TB USB 3.0 drive that I connect with usb-storage quirks as its UAS implementation is problematic. Random hangs that flood dmesg with errors.

lsusb -tv
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 5000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
    |__ Port 3: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
        ID 0bc2:231a Seagate RSS LLC Expansion Portable

Errors in dmesg start like this...

xhci_hcd 0000:00:10.0: WARN Cannot submit Set TR Deq Ptr
xhci_hcd 0000:00:10.0: A Set TR Deq Ptr command is pending.
usb 3-3: reset SuperSpeed Gen 1 USB device number 3 using xhci_hcd
sd 5:0:0:0: [sdd] tag#0 FAILED Result: hostbyte=DID_TIME_OUT driverbyte=DRIVER_OK cmd_age=31s
sd 5:0:0:0: [sdd] tag#0 CDB: Read(16) 88 00 00 00 00 00 a4 01 ed 78 00 00 00 10 00 00

After that:

task:usb-storage     state:D stack:    0 pid:  286 ppid:     2 flags:0x00004000
Call Trace:
  __schedule+0x282/0x870
  ? usleep_range+0x80/0x80
  schedule+0x46/0xb0
  schedule_timeout+0xff/0x140
  ? __prepare_to_swait+0x4b/0x70
  __wait_for_common+0xae/0x160
  usb_sg_wait+0xe0/0x1a0 [usbcore]
  usb_stor_bulk_transfer_sglist.part.0+0x64/0xb0 [usb_storage]
  usb_stor_Bulk_transport+0x188/0x410 [usb_storage]
  usb_stor_invoke_transport+0x3a/0x520 [usb_storage]
  ? __prepare_to_swait+0x4b/0x70
  ? __wait_for_common+0xed/0x160
  usb_stor_control_thread+0x185/0x280 [usb_storage]
  ? storage_probe+0x2a0/0x2a0 [usb_storage]
  kthread+0x11b/0x140
  ? __kthread_bind_mask+0x60/0x60
  ret_from_fork+0x22/0x30
Comment 194 Mathias Nyman 2021-03-30 08:58:39 UTC
(In reply to Zak from comment #193)
> 
> 
> Errors in dmesg start like this...
> 
> xhci_hcd 0000:00:10.0: WARN Cannot submit Set TR Deq Ptr
> xhci_hcd 0000:00:10.0: A Set TR Deq Ptr command is pending.

There are recent major changes in this area in the xhci driver.
The above message no longer exists, new message in this case is
"Set TR Deq already pending, don't submit for x" 

Can you try this on a 5.12-rc kernel?

Thanks
Mathias
Comment 195 mikec 2021-04-06 20:36:40 UTC
Created attachment 296259 [details]
xhci no soft retry for Intel xhci 8086:06ed and 8086:31a8

Hi

I am having this issue on 2 systems when I plug in 
a Hoco Hub HB16. The Hoco Hub HB16 is a 6 in 1 adapter that
includes 
Type-C to USB3.0 x3
Type-C to HDMI
Type-C to RJ45 Ethernet (RealTek RTL8153, linux loads driver rtl8153b-2)
Type-C to Type-C(PD2.0)
USB Billboard device

Also when the device is plugged into a Windows10 machine
for the first time it presents a disk that contains the RTL8153
drivers, the user is provided with an option to install these. This
"disk" is not visible later.

The 2 systems where this device failed both reported
"WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state."
Both systems have Ubuntu Mate 20.10

$ uname -a
5.8.0-48-generic #54-Ubuntu SMP Fri Mar 19 14:25:20 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux


1. Dell XPS 9500 (Intel(R) Core(TM) i5-10300H CPU @ 2.50GHz)
$ sudo lspci -k -nn | grep -B2 xhci
    00:14.0 USB controller [0c03]: Intel Corporation Comet Lake USB 3.1 xHCI Host Controller [8086:06ed]
	Subsystem: Dell Comet Lake USB 3.1 xHCI Host Controller [1028:097d]
	Kernel driver in use: xhci_hcd
	Kernel modules: xhci_pci
--
    7:00.0 USB controller [0c03]: Intel Corporation JHL7540 Thunderbolt 3 USB Controller [Titan Ridge 4C 2018] [8086:15ec] (rev 06)
	Subsystem: Dell JHL7540 Thunderbolt 3 USB Controller [Titan Ridge 4C 2018] [1028:097d]
	Kernel driver in use: xhci_hcd
	Kernel modules: xhci_pci



2. Seed Studio Odyssey J4105 (Intel(R) Celeron(R) J4105 CPU @ 1.50GHz)
$ sudo lspci -k -nn | grep -B3 xhci 
    00:15.0 USB controller [0c03]: Intel Corporation Device [8086:31a8] (rev 03)
	DeviceName: Onboard - Other
	Subsystem: Intel Corporation Device [8086:7270]
	Kernel driver in use: xhci_hcd
	Kernel modules: xhci_pci

I applied the changes in Stanislaw's patch at comment 176, I added the
PCI IDs to match both my systems.

I can confirm that with the patch applied both systems no longer reported  the 
issue ""WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state."

Just to note that on the Dell XPS I use the Dell DA20 Adapter which is a Type-C
to USB and HDMI adapter. This appears to have an ASIX Elec. Corp. AX88179 
USB 3.0 to Gigabit Ethernet which I don't have any issues with.
Comment 196 Luke-Jr 2021-05-29 18:08:35 UTC
Encountered this with a PCI-e card using ASMedia Technology Inc. ASM1142 USB 3.1 Host Controller

Moved to my native "Intel Corporation Device a3af" USB bus, this error disappeared (though other problems remain in my case)

Linux 5.10.33

Of potential noteworthiness: When I got my Talos II, I tried to move this ASMedia USB PCI-e card to it, and found it was immediately shutdown by the IOMMU whenever I would try to use it at all. It seems the firmware is garbage.

IIRC, someone was getting close to an open source firmware replacement without those issues... would be interesting to see if it helps with this bug as well.
Comment 197 Ivan 2021-06-24 09:37:58 UTC
same problem
5.12.12-arch1-1 #1 SMP PREEMPT Fri, 18 Jun 2021 21:59:22 +0000 x86_64 GNU/Linux

GPD Pocket

00:00.0 Host bridge [0600]: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series SoC Transaction Register [8086:2280] (rev 34)
	Subsystem: Intel Corporation Device [8086:7270]
	Kernel driver in use: iosf_mbi_pci
00:02.0 VGA compatible controller [0300]: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Integrated Graphics Controller [8086:22b0] (rev 34)
	DeviceName:  Onboard IGD
	Subsystem: Intel Corporation Device [8086:7270]
	Kernel driver in use: i915
	Kernel modules: i915
00:0b.0 Signal processing controller [1180]: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series Power Management Controller [8086:22dc] (rev 34)
	Subsystem: Intel Corporation Device [8086:7270]
	Kernel driver in use: proc_thermal
	Kernel modules: processor_thermal_device
00:14.0 USB controller [0c03]: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series USB xHCI Controller [8086:22b5] (rev 34)
	Subsystem: Intel Corporation Device [8086:7270]
	Kernel driver in use: xhci_hcd
	Kernel modules: xhci_pci
00:1a.0 Encryption controller [1080]: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series Trusted Execution Engine [8086:2298] (rev 34)
	Subsystem: Intel Corporation Device [8086:7270]
	Kernel modules: mei_txe
00:1c.0 PCI bridge [0604]: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCI Express Port #1 [8086:22c8] (rev 34)
	Kernel driver in use: pcieport
00:1f.0 ISA bridge [0601]: Intel Corporation Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series PCU [8086:229c] (rev 34)
	Subsystem: Intel Corporation Device [8086:7270]
	Kernel modules: lpc_ich
01:00.0 Network controller [0280]: Broadcom Inc. and subsidiaries BCM4356 802.11ac Wireless Network Adapter [14e4:43ec] (rev 02)
	Subsystem: Gemtek Technology Co., Ltd Device [17f9:0036]
	Kernel driver in use: brcmfmac
	Kernel modules: brcmfmac


# dmidecode 3.3
Getting SMBIOS data from sysfs.
SMBIOS 3.0.0 present.
Table at 0x5B8DE000.

Handle 0x0000, DMI type 0, 24 bytes
BIOS Information
	Vendor: American Megatrends Inc.
	Version: 5.11
	Release Date: 06/28/2017
	Address: 0xF0000
	Runtime Size: 64 kB
	ROM Size: 4 MB
	Characteristics:
		PCI is supported
		BIOS is upgradeable
		BIOS shadowing is allowed
		Boot from CD is supported
		Selectable boot is supported
		BIOS ROM is socketed
		EDD is supported
		5.25"/1.2 MB floppy services are supported (int 13h)
		3.5"/720 kB floppy services are supported (int 13h)
		3.5"/2.88 MB floppy services are supported (int 13h)
		Print screen service is supported (int 5h)
		Serial services are supported (int 14h)
		Printer services are supported (int 17h)
		ACPI is supported
		USB legacy is supported
		BIOS boot specification is supported
		Targeted content distribution is supported
		UEFI is supported
	BIOS Revision: 5.11

Handle 0x0001, DMI type 1, 27 bytes
System Information
	Manufacturer: Default string
	Product Name: Default string
	Version: Default string
	Serial Number: Default string
	UUID: 03000200-0400-0500-0006-000700080009
	Wake-up Type: Power Switch
	SKU Number: Default string
	Family: Default string

Handle 0x0002, DMI type 2, 15 bytes
Base Board Information
	Manufacturer: AMI Corporation
	Product Name: Default string
	Version: Default string
	Serial Number: Default string
	Asset Tag: Default string
	Features:
		Board is a hosting board
		Board is replaceable
	Location In Chassis: Default string
	Chassis Handle: 0x0003
	Type: Motherboard
	Contained Object Handles: 0

Handle 0x0003, DMI type 3, 22 bytes
Chassis Information
	Manufacturer: Default string
	Type: Desktop
	Lock: Not Present
	Version: Default string
	Serial Number: Default string
	Asset Tag: Default string
	Boot-up State: Safe
	Power Supply State: Safe
	Thermal State: Safe
	Security Status: None
	OEM Information: 0x00000000
	Height: Unspecified
	Number Of Power Cords: 1
	Contained Elements: 0
	SKU Number: Default string

Handle 0x0008, DMI type 8, 9 bytes
Port Connector Information
	Internal Reference Designator: J1A1
	Internal Connector Type: None
	External Reference Designator: PS2Mouse
	External Connector Type: PS/2
	Port Type: Mouse Port

Handle 0x0009, DMI type 8, 9 bytes
Port Connector Information
	Internal Reference Designator: J1A1
	Internal Connector Type: None
	External Reference Designator: Keyboard
	External Connector Type: PS/2
	Port Type: Keyboard Port

Handle 0x000A, DMI type 8, 9 bytes
Port Connector Information
	Internal Reference Designator: J2A1
	Internal Connector Type: None
	External Reference Designator: TV Out
	External Connector Type: Mini Centronics Type-14
	Port Type: Other

Handle 0x000B, DMI type 8, 9 bytes
Port Connector Information
	Internal Reference Designator: J2A2A
	Internal Connector Type: None
	External Reference Designator: COM A
	External Connector Type: DB-9 male
	Port Type: Serial Port 16550A Compatible

Handle 0x000C, DMI type 8, 9 bytes
Port Connector Information
	Internal Reference Designator: J2A2B
	Internal Connector Type: None
	External Reference Designator: Video
	External Connector Type: DB-15 female
	Port Type: Video Port

Handle 0x000D, DMI type 8, 9 bytes
Port Connector Information
	Internal Reference Designator: J3A1
	Internal Connector Type: None
	External Reference Designator: USB1
	External Connector Type: Access Bus (USB)
	Port Type: USB

Handle 0x000E, DMI type 8, 9 bytes
Port Connector Information
	Internal Reference Designator: J3A1
	Internal Connector Type: None
	External Reference Designator: USB2
	External Connector Type: Access Bus (USB)
	Port Type: USB

Handle 0x000F, DMI type 8, 9 bytes
Port Connector Information
	Internal Reference Designator: J3A1
	Internal Connector Type: None
	External Reference Designator: USB3
	External Connector Type: Access Bus (USB)
	Port Type: USB

Handle 0x0010, DMI type 8, 9 bytes
Port Connector Information
	Internal Reference Designator: J9A1 - TPM HDR
	Internal Connector Type: Other
	External Reference Designator: Not Specified
	External Connector Type: None
	Port Type: Other

Handle 0x0011, DMI type 8, 9 bytes
Port Connector Information
	Internal Reference Designator: J9C1 - PCIE DOCKING CONN
	Internal Connector Type: Other
	External Reference Designator: Not Specified
	External Connector Type: None
	Port Type: Other

Handle 0x0012, DMI type 8, 9 bytes
Port Connector Information
	Internal Reference Designator: J2B3 - CPU FAN
	Internal Connector Type: Other
	External Reference Designator: Not Specified
	External Connector Type: None
	Port Type: Other

Handle 0x0013, DMI type 8, 9 bytes
Port Connector Information
	Internal Reference Designator: J6C2 - EXT HDMI
	Internal Connector Type: Other
	External Reference Designator: Not Specified
	External Connector Type: None
	Port Type: Other

Handle 0x0014, DMI type 8, 9 bytes
Port Connector Information
	Internal Reference Designator: J3C1 - GMCH FAN
	Internal Connector Type: Other
	External Reference Designator: Not Specified
	External Connector Type: None
	Port Type: Other

Handle 0x0015, DMI type 8, 9 bytes
Port Connector Information
	Internal Reference Designator: J1D1 - ITP
	Internal Connector Type: Other
	External Reference Designator: Not Specified
	External Connector Type: None
	Port Type: Other

Handle 0x0016, DMI type 8, 9 bytes
Port Connector Information
	Internal Reference Designator: J9E2 - MDC INTPSR
	Internal Connector Type: Other
	External Reference Designator: Not Specified
	External Connector Type: None
	Port Type: Other

Handle 0x0017, DMI type 8, 9 bytes
Port Connector Information
	Internal Reference Designator: J9E4 - MDC INTPSR
	Internal Connector Type: Other
	External Reference Designator: Not Specified
	External Connector Type: None
	Port Type: Other

Handle 0x0018, DMI type 8, 9 bytes
Port Connector Information
	Internal Reference Designator: J9E3 - LPC HOT DOCKING
	Internal Connector Type: Other
	External Reference Designator: Not Specified
	External Connector Type: None
	Port Type: Other

Handle 0x0019, DMI type 8, 9 bytes
Port Connector Information
	Internal Reference Designator: J9E1 - SCAN MATRIX
	Internal Connector Type: Other
	External Reference Designator: Not Specified
	External Connector Type: None
	Port Type: Other

Handle 0x001A, DMI type 8, 9 bytes
Port Connector Information
	Internal Reference Designator: J9G1 - LPC SIDE BAND
	Internal Connector Type: Other
	External Reference Designator: Not Specified
	External Connector Type: None
	Port Type: Other

Handle 0x001B, DMI type 8, 9 bytes
Port Connector Information
	Internal Reference Designator: J8F1 - UNIFIED
	Internal Connector Type: Other
	External Reference Designator: Not Specified
	External Connector Type: None
	Port Type: Other

Handle 0x001C, DMI type 8, 9 bytes
Port Connector Information
	Internal Reference Designator: J6F1 - LVDS
	Internal Connector Type: Other
	External Reference Designator: Not Specified
	External Connector Type: None
	Port Type: Other

Handle 0x001D, DMI type 8, 9 bytes
Port Connector Information
	Internal Reference Designator: J2F1 - LAI FAN
	Internal Connector Type: Other
	External Reference Designator: Not Specified
	External Connector Type: None
	Port Type: Other

Handle 0x001E, DMI type 8, 9 bytes
Port Connector Information
	Internal Reference Designator: J2G1 - GFX VID
	Internal Connector Type: Other
	External Reference Designator: Not Specified
	External Connector Type: None
	Port Type: Other

Handle 0x001F, DMI type 8, 9 bytes
Port Connector Information
	Internal Reference Designator: J1G6 - AC JACK
	Internal Connector Type: Other
	External Reference Designator: Not Specified
	External Connector Type: None
	Port Type: Other

Handle 0x0020, DMI type 9, 17 bytes
System Slot Information
	Designation: J6B2
	Type: x16 PCI Express
	Current Usage: In Use
	Length: Long
	ID: 0
	Characteristics:
		3.3 V is provided
		Opening is shared
		PME signal is supported
	Bus Address: 0000:00:01.0

Handle 0x0021, DMI type 9, 17 bytes
System Slot Information
	Designation: J6B1
	Type: x1 PCI Express
	Current Usage: In Use
	Length: Short
	ID: 1
	Characteristics:
		3.3 V is provided
		Opening is shared
		PME signal is supported
	Bus Address: 0000:00:1c.3

Handle 0x0022, DMI type 9, 17 bytes
System Slot Information
	Designation: J6D1
	Type: x1 PCI Express
	Current Usage: In Use
	Length: Short
	ID: 2
	Characteristics:
		3.3 V is provided
		Opening is shared
		PME signal is supported
	Bus Address: 0000:00:1c.4

Handle 0x0023, DMI type 9, 17 bytes
System Slot Information
	Designation: J7B1
	Type: x1 PCI Express
	Current Usage: In Use
	Length: Short
	ID: 3
	Characteristics:
		3.3 V is provided
		Opening is shared
		PME signal is supported
	Bus Address: 0000:00:1c.5

Handle 0x0024, DMI type 9, 17 bytes
System Slot Information
	Designation: J8B4
	Type: x1 PCI Express
	Current Usage: In Use
	Length: Short
	ID: 4
	Characteristics:
		3.3 V is provided
		Opening is shared
		PME signal is supported
	Bus Address: 0000:00:1c.6

Handle 0x0025, DMI type 10, 6 bytes
On Board Device Information
	Type: Video
	Status: Enabled
	Description:    To Be Filled By O.E.M.

Handle 0x0026, DMI type 11, 5 bytes
OEM Strings
	String 1: Default string

Handle 0x0027, DMI type 12, 5 bytes
System Configuration Options
	Option 1: Default string

Handle 0x0028, DMI type 16, 23 bytes
Physical Memory Array
	Location: System Board Or Motherboard
	Use: System Memory
	Error Correction Type: Multi-bit ECC
	Maximum Capacity: 8 GB
	Error Information Handle: Not Provided
	Number Of Devices: 2

Handle 0x0029, DMI type 19, 31 bytes
Memory Array Mapped Address
	Starting Address: 0x00000000000
	Ending Address: 0x001FFFFFFFF
	Range Size: 8 GB
	Physical Array Handle: 0x0028
	Partition Width: 2

Handle 0x002A, DMI type 17, 40 bytes
Memory Device
	Array Handle: 0x0028
	Error Information Handle: Not Provided
	Total Width: 8 bits
	Data Width: 64 bits
	Size: 4 GB
	Form Factor: DIMM
	Set: None
	Locator: A1_DIMM0
	Bank Locator: A1_BANK0
	Type: DDR3
	Type Detail: Unknown
	Speed: 1600 MT/s
	Manufacturer: Hynix Semiconductor
	Serial Number: 00000000
	Asset Tag: 00000000
	Part Number: 00000000
	Rank: Unknown
	Configured Memory Speed: 1600 MT/s
	Minimum Voltage: 1.5 V
	Maximum Voltage: 1.5 V
	Configured Voltage: 1.5 V

Handle 0x002B, DMI type 20, 35 bytes
Memory Device Mapped Address
	Starting Address: 0x00000000000
	Ending Address: 0x000FFFFFFFF
	Range Size: 4 GB
	Physical Device Handle: 0x002A
	Memory Array Mapped Address Handle: 0x0029
	Partition Row Position: Unknown
	Interleave Position: 1
	Interleaved Data Depth: 2

Handle 0x002C, DMI type 17, 40 bytes
Memory Device
	Array Handle: 0x0028
	Error Information Handle: Not Provided
	Total Width: 8 bits
	Data Width: 64 bits
	Size: 4 GB
	Form Factor: DIMM
	Set: None
	Locator: A1_DIMM1
	Bank Locator: A1_BANK1
	Type: DDR3
	Type Detail: Unknown
	Speed: 1600 MT/s
	Manufacturer: Hynix Semiconductor
	Serial Number: 00000000
	Asset Tag: 00000000
	Part Number: 00000000
	Rank: Unknown
	Configured Memory Speed: 1600 MT/s
	Minimum Voltage: 1.5 V
	Maximum Voltage: 1.5 V
	Configured Voltage: 1.5 V

Handle 0x002D, DMI type 20, 35 bytes
Memory Device Mapped Address
	Starting Address: 0x00100000000
	Ending Address: 0x001FFFFFFFF
	Range Size: 4 GB
	Physical Device Handle: 0x002C
	Memory Array Mapped Address Handle: 0x0029
	Partition Row Position: Unknown
	Interleave Position: 2
	Interleaved Data Depth: 2

Handle 0x002E, DMI type 32, 20 bytes
System Boot Information
	Status: No errors detected

Handle 0x002F, DMI type 41, 11 bytes
Onboard Device
	Reference Designation:  Onboard IGD
	Type: Video
	Status: Enabled
	Type Instance: 1
	Bus Address: 0000:00:02.0

Handle 0x0030, DMI type 41, 11 bytes
Onboard Device
	Reference Designation:  Onboard LAN
	Type: Ethernet
	Status: Enabled
	Type Instance: 1
	Bus Address: 0000:00:19.0

Handle 0x0031, DMI type 41, 11 bytes
Onboard Device
	Reference Designation:  Onboard 1394
	Type: Other
	Status: Enabled
	Type Instance: 1
	Bus Address: 0000:03:1c.2

Handle 0x0032, DMI type 7, 19 bytes
Cache Information
	Socket Designation: CPU Internal L1
	Configuration: Enabled, Not Socketed, Level 1
	Operational Mode: Write Back
	Location: Internal
	Installed Size: 224 kB
	Maximum Size: 224 kB
	Supported SRAM Types:
		Unknown
	Installed SRAM Type: Unknown
	Speed: Unknown
	Error Correction Type: Single-bit ECC
	System Type: Other
	Associativity: Other

Handle 0x0033, DMI type 7, 19 bytes
Cache Information
	Socket Designation: CPU Internal L2
	Configuration: Enabled, Not Socketed, Level 2
	Operational Mode: Write Back
	Location: Internal
	Installed Size: 2 MB
	Maximum Size: 2 MB
	Supported SRAM Types:
		Unknown
	Installed SRAM Type: Unknown
	Speed: Unknown
	Error Correction Type: Single-bit ECC
	System Type: Unified
	Associativity: 16-way Set-associative

Handle 0x0034, DMI type 4, 48 bytes
Processor Information
	Socket Designation: SOCKET 0
	Type: Central Processor
	Family: Atom
	Manufacturer: Intel
	ID: C4 06 04 00 FF FB EB BF
	Signature: Type 0, Family 6, Model 76, Stepping 4
	Flags:
		FPU (Floating-point unit on-chip)
		VME (Virtual mode extension)
		DE (Debugging extension)
		PSE (Page size extension)
		TSC (Time stamp counter)
		MSR (Model specific registers)
		PAE (Physical address extension)
		MCE (Machine check exception)
		CX8 (CMPXCHG8 instruction supported)
		APIC (On-chip APIC hardware supported)
		SEP (Fast system call)
		MTRR (Memory type range registers)
		PGE (Page global enable)
		MCA (Machine check architecture)
		CMOV (Conditional move instruction supported)
		PAT (Page attribute table)
		PSE-36 (36-bit page size extension)
		CLFSH (CLFLUSH instruction supported)
		DS (Debug store)
		ACPI (ACPI supported)
		MMX (MMX technology supported)
		FXSR (FXSAVE and FXSTOR instructions supported)
		SSE (Streaming SIMD extensions)
		SSE2 (Streaming SIMD extensions 2)
		SS (Self-snoop)
		HTT (Multi-threading)
		TM (Thermal monitor supported)
		PBE (Pending break enabled)
	Version: Intel(R) Atom(TM) x7-Z8750 CPU @ 1.60GHz
	Voltage: 1.2 V
	External Clock: 80 MHz
	Max Speed: 2400 MHz
	Current Speed: 1600 MHz
	Status: Populated, Enabled
	Upgrade: Socket BGA1155
	L1 Cache Handle: 0x0032
	L2 Cache Handle: 0x0033
	L3 Cache Handle: Not Provided
	Serial Number: Not Specified
	Asset Tag: Fill By OEM
	Part Number: Fill By OEM
	Core Count: 4
	Core Enabled: 4
	Thread Count: 4
	Characteristics:
		64-bit capable

Handle 0x0035, DMI type 13, 22 bytes
BIOS Language Information
	Language Description Format: Long
	Installable Languages: 1
		en|US|iso8859-1
	Currently Installed Language: en|US|iso8859-1

Handle 0x0036, DMI type 127, 4 bytes
End Of Table
Comment 198 Antonio 2021-08-24 18:04:51 UTC
I have same problem with kernels 5.13.12 and 5.14.0-rc7:

dmesg:
xhci_hcd 0000:00:14.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.

journalctl:
ago 24 18:38:40 SERVER kernel: sd 4:0:0:0: [sda] tag#3 FAILED Result: hostbyte=DID_TIME_OUT driverbyte=DRIVER_OK cmd_age=30s
Comment 199 ST 2021-09-15 22:43:14 UTC
I also experience exactly same issue on multiple USB devices ( USB-WIFI or a USB-Webcam ) only on my brand new AMD Mainboard ( ASRock model: B550M-HDV)

I tried both ubuntu focal and hirsute with latest kernels on my OldPC (ASUSTeK model: M5A78L-M LX3) and on my IntelNUC (NUC8BEB) and this issue does not happen (Tried with same USB-WIFI and USB-Webcam devices).

Issue is easily reproducible by inserting USB-WIFI and then executing "ip a" on a shell.
Comment 200 Dmitry Nezhevenko 2021-09-18 18:39:58 UTC
I also have exactly same problem, but with a bit different HW.

Now it's USB DAC branded as "Qudelix-5K". As far as I understand it's USB1 device.

[  174.358189] usb 5-2.3.2.2.1.1: new full-speed USB device number 17 using xhci_hcd
[  174.475229] usb 5-2.3.2.2.1.1: New USB device found, idVendor=0a12, idProduct=4025, bcdDevice=19.70
[  174.475232] usb 5-2.3.2.2.1.1: New USB device strings: Mfr=1, Product=8, SerialNumber=3
[  174.475233] usb 5-2.3.2.2.1.1: Product: Qudelix-5K USB DAC/MIC 48KHz
[  174.475234] usb 5-2.3.2.2.1.1: Manufacturer: QTIL
[  174.475235] usb 5-2.3.2.2.1.1: SerialNumber: ABCDEF0123456789

It produces corrupted sound (actually some noise) just after a few seconds of playback if connected to Dell WD19TB thunderbolt dock station. Issue happens with USB-A ports on dock plus one Type-C port (front). Second Type-C port (named as "Type-C with Thunderbolt 3 port" works.

When such noise happens I'm getting followed in dmesg:

xhci_hcd 0000:3a:00.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 5 comp_code 1
xhci_hcd 0000:3a:00.0: Looking for event-dma 00000000ffe940f0 trb-start 00000000ffe94100 trb-end 00000000ffe94100 seg-start 00000000ffe94000 seg-end 00000000ffe94ff0
xhci_hcd 0000:3a:00.0: ERROR Transfer event TRB DMA ptr not part of current TD ep_index 5 comp_code 1
xhci_hcd 0000:3a:00.0: Looking for event-dma 00000000ffe949b0 trb-start 00000000ffe949c0 trb-end 00000000ffe949c0 seg-start 00000000ffe94000 seg-end 00000000ffe94ff0

I've tried to add/remove extra USB hubs (originally Qudelix was plugged to internal USB3 hub of monitor). But even if plugged directly to dock, it produces corrupted sound.

Another important thing: this dock has built-in Ethernet with r8153 chipset like mentioned above.

After reading comments here I've tried to disable soft retry using followed patch:

diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
index 1c9a7957c45c..07cbcf50160c 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -189,10 +189,11 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
 
        if (pdev->vendor == PCI_VENDOR_ID_INTEL) {
                xhci->quirks |= XHCI_LPM_SUPPORT;
                xhci->quirks |= XHCI_INTEL_HOST;
                xhci->quirks |= XHCI_AVOID_BEI;
+               xhci->quirks |= XHCI_NO_SOFT_RETRY;
        }
        if (pdev->vendor == PCI_VENDOR_ID_INTEL &&
                        pdev->device == PCI_DEVICE_ID_INTEL_PANTHERPOINT_XHCI) {
                xhci->quirks |= XHCI_EP_LIMIT_QUIRK;
                xhci->limit_active_eps = 64;

And it completely fixed issue for me. DAC produces clear sound even if connected through chain of two hubs!


PS. 
lspci -k -nn | grep -B2 xhci 
00:14.0 USB controller [0c03]: Intel Corporation Comet Lake PCH-LP USB 3.1 xHCI Host Controller [8086:02ed]
        Subsystem: Hewlett-Packard Company Comet Lake PCH-LP USB 3.1 xHCI Host Controller [103c:8724]
        Kernel driver in use: xhci_hcd
        Kernel modules: xhci_pci
--
37:00.0 USB controller [0c03]: Intel Corporation JHL7540 Thunderbolt 3 USB Controller [Titan Ridge 4C 2018] [8086:15ec] (rev 06)
        Subsystem: Hewlett-Packard Company JHL7540 Thunderbolt 3 USB Controller [Titan Ridge 4C 2018] [103c:8723]
        Kernel driver in use: xhci_hcd
        Kernel modules: xhci_pci
--
3a:00.0 USB controller [0c03]: Intel Corporation JHL7540 Thunderbolt 3 USB Controller [Titan Ridge DD 2018] [8086:15f0] (rev 06)
        Subsystem: Intel Corporation JHL7540 Thunderbolt 3 USB Controller [Titan Ridge DD 2018] [8086:0000]
        Kernel driver in use: xhci_hcd
        Kernel modules: xhci_pci

5.14.6 kernel

Hope that this will help to fix it
Comment 201 raul 2022-06-21 22:06:02 UTC
Turns out the problem was the cable, it was too long. A shorter USB 3.0 cable (1.8m) allowed a stable connection. On the same Linux 5.13 (the previous dmesg was on Linux 5.10) the longer 3 meters cable kept failing while with the 1.8 meters cable the HDD works without issue.


(In reply to raul from comment #191)
Comment 202 Futuref 2022-08-06 11:49:50 UTC
Hi,
I have also issues with USB3 on my Debian 10 with kernel 5.10.0-0.bpo.5-amd64 which is not appearing when using USB2 port:

Aug  6 13:20:14 media-server kernel: [  964.069355] scsi host17: uas_eh_device_reset_handler start
Aug  6 13:20:14 media-server kernel: [  964.197532] usb 2-1: reset SuperSpeed Gen 1 USB device number 2 using xhci_hcd
Aug  6 13:20:14 media-server kernel: [  964.219053] scsi host17: uas_eh_device_reset_handler success
Aug  6 13:20:18 media-server kernel: [  968.137601] task:sync            state:D stack:    0 pid:12237 ppid: 11291 flags:0x00004324
Aug  6 13:20:18 media-server kernel: [  968.137607] Call Trace:
Aug  6 13:20:18 media-server kernel: [  968.137621]  __schedule+0x2be/0x770
Aug  6 13:20:18 media-server kernel: [  968.137630]  schedule+0x3c/0xa0
Aug  6 13:20:18 media-server kernel: [  968.137635]  io_schedule+0x12/0x40
Aug  6 13:20:18 media-server kernel: [  968.137644]  wait_on_page_bit+0x127/0x230
Aug  6 13:20:18 media-server kernel: [  968.137651]  ? __page_cache_alloc+0x80/0x80
Aug  6 13:20:18 media-server kernel: [  968.137657]  wait_on_page_writeback+0x25/0x70
Aug  6 13:20:18 media-server kernel: [  968.137663]  __filemap_fdatawait_range+0x89/0xf0
Aug  6 13:20:18 media-server kernel: [  968.137673]  ? sync_inodes_one_sb+0x20/0x20
Aug  6 13:20:18 media-server kernel: [  968.137679]  filemap_fdatawait_keep_errors+0x1a/0x40
Aug  6 13:20:18 media-server kernel: [  968.137684]  iterate_bdevs+0xad/0x150
Aug  6 13:20:18 media-server kernel: [  968.137691]  ksys_sync+0x7c/0xb0
Aug  6 13:20:18 media-server kernel: [  968.137697]  __do_sys_sync+0xa/0x10
Aug  6 13:20:18 media-server kernel: [  968.137704]  do_syscall_64+0x33/0x80
Aug  6 13:20:18 media-server kernel: [  968.137709]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
Aug  6 13:20:18 media-server kernel: [  968.137714] RIP: 0033:0x7fc4ec0529aa
Aug  6 13:20:18 media-server kernel: [  968.137717] RSP: 002b:00007ffcddf49048 EFLAGS: 00000246 ORIG_RAX: 00000000000000a2
Aug  6 13:20:18 media-server kernel: [  968.137723] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fc4ec0529aa
Aug  6 13:20:18 media-server kernel: [  968.137725] RDX: 0000000000000001 RSI: 0000000000000000 RDI: 00000000a8002000
Aug  6 13:20:18 media-server kernel: [  968.137728] RBP: 0000000000000000 R08: 0000555ba9703dcf R09: 00007ffcddf4afe2
Aug  6 13:20:18 media-server kernel: [  968.137730] R10: 00007fc4ec01a201 R11: 0000000000000246 R12: 0000000000000001
Aug  6 13:20:18 media-server kernel: [  968.137733] R13: 0000000000000001 R14: 00007ffcddf49158 R15: 0000000000000000
Comment 203 Marco Berizzi 2022-09-02 13:39:26 UTC
Hello everyone,

I encountered the problem with kernel 6.0.0-rc3 on a lenovo t470 laptop and a usb3 axis card. The system was started with the parameter intel_idle.max_cstate=1 and this appears to affect the possibility of the bug appearing. I have now rebooted the system without this parameter.

I have another similar setup (same laptop and same usb3 network card, but with linux 6.0.0-rc2) that has been active for 8 days started without the parameter intel_idle.max_cstate=1 and the problem has not occurred to date.

The distribution is Slackware 15 (64 bit).

This is the full output of dmesg.

Any feedback is welcome.

Marco

[    0.000000] Linux version 6.0.0-rc3 (root@Cherepakha) (gcc (GCC) 11.2.0, GNU ld version 2.37-slack15) #1 SMP PREEMPT_DYNAMIC Tue Aug 30 16:07:18 CEST 2022
[    0.000000] Command line: auto BOOT_IMAGE=Linux ro root=10303 intel_idle.max_cstate=1
[    0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
[    0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[    0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
[    0.000000] x86/fpu: Supporting XSAVE feature 0x008: 'MPX bounds registers'
[    0.000000] x86/fpu: Supporting XSAVE feature 0x010: 'MPX CSR'
[    0.000000] x86/fpu: xstate_offset[2]:  576, xstate_sizes[2]:  256
[    0.000000] x86/fpu: xstate_offset[3]:  832, xstate_sizes[3]:   64
[    0.000000] x86/fpu: xstate_offset[4]:  896, xstate_sizes[4]:   64
[    0.000000] x86/fpu: Enabled xstate features 0x1f, context size is 960 bytes, using 'compacted' format.
[    0.000000] signal: max sigframe size: 1616
[    0.000000] BIOS-provided physical RAM map:
[    0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009cfff] usable
[    0.000000] BIOS-e820: [mem 0x000000000009d000-0x000000000009ffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000000e0000-0x00000000000fffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000003fffffff] usable
[    0.000000] BIOS-e820: [mem 0x0000000040000000-0x00000000403fffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000040400000-0x000000008b79bfff] usable
[    0.000000] BIOS-e820: [mem 0x000000008b79c000-0x0000000090652fff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000090653000-0x0000000090653fff] ACPI NVS
[    0.000000] BIOS-e820: [mem 0x0000000090654000-0x000000009b52cfff] reserved
[    0.000000] BIOS-e820: [mem 0x000000009b52d000-0x000000009b599fff] ACPI NVS
[    0.000000] BIOS-e820: [mem 0x000000009b59a000-0x000000009b5fefff] ACPI data
[    0.000000] BIOS-e820: [mem 0x000000009b5ff000-0x000000009f7fffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000f0000000-0x00000000f3ffffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fd000000-0x00000000fe7fffff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fec00000-0x00000000fec00fff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fed00000-0x00000000fed00fff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fed10000-0x00000000fed19fff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fed84000-0x00000000fed84fff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000fee00000-0x00000000fee00fff] reserved
[    0.000000] BIOS-e820: [mem 0x00000000ff800000-0x00000000ffffffff] reserved
[    0.000000] BIOS-e820: [mem 0x0000000100000000-0x000000045e7fffff] usable
[    0.000000] NX (Execute Disable) protection: active
[    0.000000] SMBIOS 3.0.0 present.
[    0.000000] DMI: LENOVO 20HES0KW0J/20HES0KW0J, BIOS N1QET95W (1.70 ) 05/25/2022
[    0.000000] tsc: Detected 2700.000 MHz processor
[    0.000000] tsc: Detected 2699.909 MHz TSC
[    0.000825] e820: update [mem 0x00000000-0x00000fff] usable ==> reserved
[    0.000828] e820: remove [mem 0x000a0000-0x000fffff] usable
[    0.000835] last_pfn = 0x45e800 max_arch_pfn = 0x400000000
[    0.000956] x86/PAT: Configuration [0-7]: WB  WC  UC- UC  WB  WP  UC- WT  
[    0.001753] last_pfn = 0x8b79c max_arch_pfn = 0x400000000
[    0.001759] Using GB pages for direct mapping
[    0.002199] ACPI: Early table checksum verification disabled
[    0.002201] ACPI: RSDP 0x00000000000F0140 000024 (v02 LENOVO)
[    0.002205] ACPI: XSDT 0x000000009B5C1188 000104 (v01 LENOVO TP-N1Q   00001700 PTEC 00000002)
[    0.002210] ACPI: FACP 0x000000009B5F5000 0000F4 (v05 LENOVO TP-N1Q   00001700 PTEC 00000002)
[    0.002215] ACPI: DSDT 0x000000009B5CF000 02151D (v02 LENOVO SKL      00000000 INTL 20160527)
[    0.002218] ACPI: FACS 0x000000009B53E000 000040
[    0.002220] ACPI: SSDT 0x000000009B5FC000 0003CC (v02 LENOVO Tpm2Tabl 00001000 INTL 20160527)
[    0.002223] ACPI: TPM2 0x000000009B5FB000 000034 (v03 LENOVO TP-N1Q   00001700 PTEC 00000002)
[    0.002226] ACPI: UEFI 0x000000009B553000 000042 (v01 LENOVO TP-N1Q   00001700 PTEC 00000002)
[    0.002229] ACPI: SSDT 0x000000009B5F7000 0030E4 (v02 LENOVO SaSsdt   00003000 INTL 20160527)
[    0.002232] ACPI: SSDT 0x000000009B5F6000 0005B6 (v02 LENOVO PerfTune 00001000 INTL 20160527)
[    0.002235] ACPI: HPET 0x000000009B5F4000 000038 (v01 LENOVO TP-N1Q   00001700 PTEC 00000002)
[    0.002238] ACPI: APIC 0x000000009B5F3000 0000BC (v03 LENOVO TP-N1Q   00001700 PTEC 00000002)
[    0.002240] ACPI: MCFG 0x000000009B5F2000 00003C (v01 LENOVO TP-N1Q   00001700 PTEC 00000002)
[    0.002243] ACPI: ECDT 0x000000009B5F1000 000053 (v01 LENOVO TP-N1Q   00001700 PTEC 00000002)
[    0.002245] ACPI: SSDT 0x000000009B5CE000 00021C (v01 LENOVO Rmv_Batt 00001000 INTL 20160527)
[    0.002248] ACPI: SSDT 0x000000009B5CC000 00174F (v02 LENOVO ProjSsdt 00000010 INTL 20160527)
[    0.002251] ACPI: BOOT 0x000000009B5CB000 000028 (v01 LENOVO TP-N1Q   00001700 PTEC 00000002)
[    0.002254] ACPI: BATB 0x000000009B5CA000 00004A (v02 LENOVO TP-N1Q   00001700 PTEC 00000002)
[    0.002256] ACPI: SLIC 0x000000009B5C9000 000176 (v01 LENOVO TP-N1Q   00001700 PTEC 00000002)
[    0.002259] ACPI: SSDT 0x000000009B5C7000 0017AE (v02 LENOVO CpuSsdt  00003000 INTL 20160527)
[    0.002262] ACPI: SSDT 0x000000009B5C6000 00056D (v02 LENOVO CtdpB    00001000 INTL 20160527)
[    0.002264] ACPI: SSDT 0x000000009B5C5000 000634 (v02 LENOVO UsbCTabl 00001000 INTL 20160527)
[    0.002267] ACPI: WSMT 0x000000009B5C4000 000028 (v01 LENOVO TP-N1Q   00001700 PTEC 00000002)
[    0.002270] ACPI: SSDT 0x000000009B5C3000 000141 (v02 LENOVO HdaDsp   00000000 INTL 20160527)
[    0.002273] ACPI: SSDT 0x000000009B5C2000 0004C5 (v02 LENOVO TbtTypeC 00000000 INTL 20160527)
[    0.002275] ACPI: DBGP 0x000000009B5FD000 000034 (v01 LENOVO TP-N1Q   00001700 PTEC 00000002)
[    0.002278] ACPI: DBG2 0x000000009B5C0000 000054 (v00 LENOVO TP-N1Q   00001700 PTEC 00000002)
[    0.002281] ACPI: MSDM 0x000000009B5BF000 000055 (v03 LENOVO TP-N1Q   00001700 PTEC 00000002)
[    0.002283] ACPI: DMAR 0x000000009B5BE000 0000A8 (v01 LENOVO TP-N1Q   00001700 PTEC 00000002)
[    0.002286] ACPI: ASF! 0x000000009B5BD000 0000A0 (v32 LENOVO TP-N1Q   00001700 PTEC 00000002)
[    0.002289] ACPI: FPDT 0x000000009B5BC000 000044 (v01 LENOVO TP-N1Q   00001700 PTEC 00000002)
[    0.002291] ACPI: UEFI 0x000000009B53B000 00013E (v01 LENOVO TP-N1Q   00001700 PTEC 00000002)
[    0.002294] ACPI: Reserving FACP table memory at [mem 0x9b5f5000-0x9b5f50f3]
[    0.002295] ACPI: Reserving DSDT table memory at [mem 0x9b5cf000-0x9b5f051c]
[    0.002297] ACPI: Reserving FACS table memory at [mem 0x9b53e000-0x9b53e03f]
[    0.002298] ACPI: Reserving SSDT table memory at [mem 0x9b5fc000-0x9b5fc3cb]
[    0.002299] ACPI: Reserving TPM2 table memory at [mem 0x9b5fb000-0x9b5fb033]
[    0.002300] ACPI: Reserving UEFI table memory at [mem 0x9b553000-0x9b553041]
[    0.002301] ACPI: Reserving SSDT table memory at [mem 0x9b5f7000-0x9b5fa0e3]
[    0.002302] ACPI: Reserving SSDT table memory at [mem 0x9b5f6000-0x9b5f65b5]
[    0.002303] ACPI: Reserving HPET table memory at [mem 0x9b5f4000-0x9b5f4037]
[    0.002304] ACPI: Reserving APIC table memory at [mem 0x9b5f3000-0x9b5f30bb]
[    0.002305] ACPI: Reserving MCFG table memory at [mem 0x9b5f2000-0x9b5f203b]
[    0.002306] ACPI: Reserving ECDT table memory at [mem 0x9b5f1000-0x9b5f1052]
[    0.002306] ACPI: Reserving SSDT table memory at [mem 0x9b5ce000-0x9b5ce21b]
[    0.002307] ACPI: Reserving SSDT table memory at [mem 0x9b5cc000-0x9b5cd74e]
[    0.002308] ACPI: Reserving BOOT table memory at [mem 0x9b5cb000-0x9b5cb027]
[    0.002309] ACPI: Reserving BATB table memory at [mem 0x9b5ca000-0x9b5ca049]
[    0.002310] ACPI: Reserving SLIC table memory at [mem 0x9b5c9000-0x9b5c9175]
[    0.002311] ACPI: Reserving SSDT table memory at [mem 0x9b5c7000-0x9b5c87ad]
[    0.002312] ACPI: Reserving SSDT table memory at [mem 0x9b5c6000-0x9b5c656c]
[    0.002313] ACPI: Reserving SSDT table memory at [mem 0x9b5c5000-0x9b5c5633]
[    0.002314] ACPI: Reserving WSMT table memory at [mem 0x9b5c4000-0x9b5c4027]
[    0.002315] ACPI: Reserving SSDT table memory at [mem 0x9b5c3000-0x9b5c3140]
[    0.002316] ACPI: Reserving SSDT table memory at [mem 0x9b5c2000-0x9b5c24c4]
[    0.002317] ACPI: Reserving DBGP table memory at [mem 0x9b5fd000-0x9b5fd033]
[    0.002319] ACPI: Reserving DBG2 table memory at [mem 0x9b5c0000-0x9b5c0053]
[    0.002320] ACPI: Reserving MSDM table memory at [mem 0x9b5bf000-0x9b5bf054]
[    0.002321] ACPI: Reserving DMAR table memory at [mem 0x9b5be000-0x9b5be0a7]
[    0.002322] ACPI: Reserving ASF! table memory at [mem 0x9b5bd000-0x9b5bd09f]
[    0.002323] ACPI: Reserving FPDT table memory at [mem 0x9b5bc000-0x9b5bc043]
[    0.002324] ACPI: Reserving UEFI table memory at [mem 0x9b53b000-0x9b53b13d]
[    0.002351] Zone ranges:
[    0.002352]   DMA      [mem 0x0000000000001000-0x0000000000ffffff]
[    0.002354]   DMA32    [mem 0x0000000001000000-0x00000000ffffffff]
[    0.002356]   Normal   [mem 0x0000000100000000-0x000000045e7fffff]
[    0.002357] Movable zone start for each node
[    0.002358] Early memory node ranges
[    0.002358]   node   0: [mem 0x0000000000001000-0x000000000009cfff]
[    0.002360]   node   0: [mem 0x0000000000100000-0x000000003fffffff]
[    0.002361]   node   0: [mem 0x0000000040400000-0x000000008b79bfff]
[    0.002362]   node   0: [mem 0x0000000100000000-0x000000045e7fffff]
[    0.002363] Initmem setup node 0 [mem 0x0000000000001000-0x000000045e7fffff]
[    0.002368] On node 0, zone DMA: 1 pages in unavailable ranges
[    0.002405] On node 0, zone DMA: 99 pages in unavailable ranges
[    0.007574] On node 0, zone DMA32: 1024 pages in unavailable ranges
[    0.040119] On node 0, zone Normal: 18532 pages in unavailable ranges
[    0.040219] On node 0, zone Normal: 6144 pages in unavailable ranges
[    0.040235] Reserving Intel graphics memory at [mem 0x9d800000-0x9f7fffff]
[    0.040428] ACPI: PM-Timer IO Port: 0x1808
[    0.040433] ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1])
[    0.040435] ACPI: LAPIC_NMI (acpi_id[0x02] high edge lint[0x1])
[    0.040436] ACPI: LAPIC_NMI (acpi_id[0x03] high edge lint[0x1])
[    0.040437] ACPI: LAPIC_NMI (acpi_id[0x04] high edge lint[0x1])
[    0.040438] ACPI: LAPIC_NMI (acpi_id[0x05] high edge lint[0x1])
[    0.040438] ACPI: LAPIC_NMI (acpi_id[0x06] high edge lint[0x1])
[    0.040439] ACPI: LAPIC_NMI (acpi_id[0x07] high edge lint[0x1])
[    0.040440] ACPI: LAPIC_NMI (acpi_id[0x08] high edge lint[0x1])
[    0.040474] IOAPIC[0]: apic_id 2, version 32, address 0xfec00000, GSI 0-119
[    0.040476] ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
[    0.040478] ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
[    0.040483] ACPI: Using ACPI (MADT) for SMP configuration information
[    0.040484] ACPI: HPET id: 0x8086a201 base: 0xfed00000
[    0.040487] TSC deadline timer available
[    0.040488] smpboot: Allowing 4 CPUs, 0 hotplug CPUs
[    0.040504] [mem 0x9f800000-0xefffffff] available for PCI devices
[    0.040507] clocksource: refined-jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1910969940391419 ns
[    0.049020] setup_percpu: NR_CPUS:4 nr_cpumask_bits:4 nr_cpu_ids:4 nr_node_ids:1
[    0.049147] percpu: Embedded 43 pages/cpu s138536 r8192 d29400 u524288
[    0.049154] pcpu-alloc: s138536 r8192 d29400 u524288 alloc=1*2097152
[    0.049156] pcpu-alloc: [0] 0 1 2 3 
[    0.049174] Built 1 zonelists, mobility grouping on.  Total pages: 4038701
[    0.049176] Kernel command line: auto BOOT_IMAGE=Linux ro root=10303 intel_idle.max_cstate=1
[    0.049205] Unknown kernel command line parameters "auto BOOT_IMAGE=Linux", will be passed to user space.
[    0.050068] Dentry cache hash table entries: 2097152 (order: 12, 16777216 bytes, linear)
[    0.050505] Inode-cache hash table entries: 1048576 (order: 11, 8388608 bytes, linear)
[    0.050547] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.050549] software IO TLB: area num 4.
[    0.100604] Memory: 16046964K/16411872K available (6144K kernel code, 1280K rwdata, 1324K rodata, 792K init, 692K bss, 364652K reserved, 0K cma-reserved)
[    0.100642] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.100895] Dynamic Preempt: none
[    0.100922] rcu: Preemptible hierarchical RCU implementation.
[    0.100923] rcu: RCU calculated value of scheduler-enlistment delay is 100 jiffies.
[    0.100947] NR_IRQS: 4352, nr_irqs: 1024, preallocated irqs: 16
[    0.101157] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    0.107390] Console: colour VGA+ 80x25
[    0.123413] printk: console [tty0] enabled
[    0.123511] ACPI: Core revision 20220331
[    0.123820] hpet: HPET dysfunctional in PC10. Force disabled.
[    0.123926] APIC: Switch to symmetric I/O mode setup
[    0.127852] clocksource: tsc-early: mask: 0xffffffffffffffff max_cycles: 0x26eae8729ef, max_idle_ns: 440795235156 ns
[    0.128000] Calibrating delay loop (skipped), value calculated using timer frequency.. 5399.81 BogoMIPS (lpj=2699909)
[    0.129000] pid_max: default: 32768 minimum: 301
[    0.129000] Mount-cache hash table entries: 32768 (order: 6, 262144 bytes, linear)
[    0.129000] Mountpoint-cache hash table entries: 32768 (order: 6, 262144 bytes, linear)
[    0.129000] CPU0: Thermal monitoring enabled (TM1)
[    0.129000] process: using mwait in idle threads
[    0.129000] Last level iTLB entries: 4KB 64, 2MB 8, 4MB 8
[    0.129000] Last level dTLB entries: 4KB 64, 2MB 0, 4MB 0, 1GB 4
[    0.129000] Spectre V1 : Mitigation: usercopy/swapgs barriers and __user pointer sanitization
[    0.129000] Spectre V2 : Kernel not compiled with retpoline; no mitigation available!
[    0.129000] Spectre V2 : Vulnerable
[    0.129000] Spectre V2 : Spectre v2 / SpectreRSB mitigation: Filling RSB on context switch
[    0.129000] Spectre V2 : Enabling Restricted Speculation for firmware calls
[    0.129000] RETBleed: WARNING: Spectre v2 mitigation leaves CPU vulnerable to RETBleed attacks, data leaks possible!
[    0.129000] RETBleed: Vulnerable
[    0.129000] Spectre V2 : mitigation: Enabling conditional Indirect Branch Prediction Barrier
[    0.129000] Spectre V2 : User space: Mitigation: STIBP via prctl
[    0.129000] Speculative Store Bypass: Mitigation: Speculative Store Bypass disabled via prctl
[    0.129000] MDS: Mitigation: Clear CPU buffers
[    0.129000] TAA: Mitigation: TSX disabled
[    0.129000] MMIO Stale Data: Mitigation: Clear CPU buffers
[    0.129000] SRBDS: Mitigation: Microcode
[    0.129000] Freeing SMP alternatives memory: 12K
[    0.129000] smpboot: CPU0: Intel(R) Core(TM) i5-7300U CPU @ 2.60GHz (family: 0x6, model: 0x8e, stepping: 0x9)
[    0.129000] Performance Events: PEBS fmt3+, Skylake events, 32-deep LBR, full-width counters, Intel PMU driver.
[    0.129000] ... version:                4
[    0.129000] ... bit width:              48
[    0.129000] ... generic registers:      4
[    0.129000] ... value mask:             0000ffffffffffff
[    0.129000] ... max period:             00007fffffffffff
[    0.129000] ... fixed-purpose events:   3
[    0.129000] ... event mask:             000000070000000f
[    0.129081] Estimated ratio of average max frequency by base frequency (times 1024): 1327
[    0.129220] rcu: Hierarchical SRCU implementation.
[    0.129320] rcu:     Max phase no-delay instances is 400.
[    0.129527] smp: Bringing up secondary CPUs ...
[    0.129726] x86: Booting SMP configuration:
[    0.129825] .... node  #0, CPUs:      #1 #2
[    0.130609] MDS CPU bug present and SMT on, data leak possible. See https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/mds.html for more details.
[    0.131162] MMIO Stale Data CPU bug present and SMT on, data leak possible. See https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/processor_mmio_stale_data.html for more details.
[    0.131479]  #3
[    0.131950] smp: Brought up 1 node, 4 CPUs
[    0.132097] smpboot: Max logical packages: 1
[    0.132190] smpboot: Total of 4 processors activated (21599.27 BogoMIPS)
[    0.133339] devtmpfs: initialized
[    0.133339] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275000 ns
[    0.133339] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.134370] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.134577] thermal_sys: Registered thermal governor 'step_wise'
[    0.134578] thermal_sys: Registered thermal governor 'user_space'
[    0.134695] cpuidle: using governor ladder
[    0.134695] cpuidle: using governor menu
[    0.135030] Simple Boot Flag at 0x47 set to 0x1
[    0.135155] ACPI FADT declares the system doesn't support PCIe ASPM, so disable it
[    0.135509] PCI: MMCONFIG for domain 0000 [bus 00-3f] at [mem 0xf0000000-0xf3ffffff] (base 0xf0000000)
[    0.135655] PCI: MMCONFIG at [mem 0xf0000000-0xf3ffffff] reserved in E820
[    0.135772] PCI: Using configuration type 1 for base access
[    0.136003] ENERGY_PERF_BIAS: Set to 'normal', was 'performance'
[    0.136655] ACPI: Added _OSI(Module Device)
[    0.137002] ACPI: Added _OSI(Processor Device)
[    0.137099] ACPI: Added _OSI(3.0 _SCP Extensions)
[    0.137191] ACPI: Added _OSI(Processor Aggregator Device)
[    0.137286] ACPI: Added _OSI(Linux-Dell-Video)
[    0.137379] ACPI: Added _OSI(Linux-Lenovo-NV-HDMI-Audio)
[    0.137473] ACPI: Added _OSI(Linux-HPI-Hybrid-Graphics)
[    0.171993] ACPI: 11 ACPI AML tables successfully acquired and loaded
[    0.172751] ACPI: EC: EC started
[    0.172846] ACPI: EC: interrupt blocked
[    0.173994] ACPI: EC: EC_CMD/EC_SC=0x66, EC_DATA=0x62
[    0.174001] ACPI: EC: Boot ECDT EC used to handle transactions
[    0.175150] ACPI: [Firmware Bug]: BIOS _OSI(Linux) query ignored
[    0.183108] ACPI: Dynamic OEM Table Load:
[    0.183219] ACPI: SSDT 0xFFFF888100272000 0006B4 (v02 PmRef  Cpu0Ist  00003000 INTL 20160527)
[    0.184206] ACPI: \_PR_.PR00: _OSC native thermal LVT Acked
[    0.185139] ACPI: Dynamic OEM Table Load:
[    0.185244] ACPI: SSDT 0xFFFF8881000F8C00 0003FF (v02 PmRef  Cpu0Cst  00003001 INTL 20160527)
[    0.186199] ACPI: Dynamic OEM Table Load:
[    0.186303] ACPI: SSDT 0xFFFF88810091B3C0 0000BA (v02 PmRef  Cpu0Hwp  00003000 INTL 20160527)
[    0.187159] ACPI: Dynamic OEM Table Load:
[    0.187264] ACPI: SSDT 0xFFFF888100272800 000628 (v02 PmRef  HwpLvt   00003000 INTL 20160527)
[    0.188369] ACPI: Dynamic OEM Table Load:
[    0.188477] ACPI: SSDT 0xFFFF888100064000 000D14 (v02 PmRef  ApIst    00003000 INTL 20160527)
[    0.189891] ACPI: Dynamic OEM Table Load:
[    0.189995] ACPI: SSDT 0xFFFF8881000F9000 000317 (v02 PmRef  ApHwp    00003000 INTL 20160527)
[    0.190812] ACPI: Dynamic OEM Table Load:
[    0.190916] ACPI: SSDT 0xFFFF8881000F9400 00030A (v02 PmRef  ApCst    00003000 INTL 20160527)
[    0.192696] ACPI: Interpreter enabled
[    0.192801] ACPI: PM: (supports S0 S5)
[    0.192899] ACPI: Using IOAPIC for interrupt routing
[    0.193027] PCI: Using host bridge windows from ACPI; if necessary, use "pci=nocrs" and report a bug
[    0.193170] PCI: Using E820 reservations for host bridge windows
[    0.193761] ACPI: Enabled 7 GPEs in block 00 to 7F
[    0.196761] ACPI: PM: Power Resource [PUBS]
[    0.213728] ACPI: PM: Power Resource [WRST]
[    0.214080] ACPI: PM: Power Resource [WRST]
[    0.224181] ACPI: PCI Root Bridge [PCI0] (domain 0000 [bus 00-3e])
[    0.224292] acpi PNP0A08:00: _OSC: OS supports [ExtendedConfig ASPM ClockPM Segments MSI HPX-Type3]
[    0.224492] acpi PNP0A08:00: _OSC: platform does not support [PME AER PCIeCapability]
[    0.224654] acpi PNP0A08:00: _OSC: not requesting control; platform does not support [PCIeCapability]
[    0.224797] acpi PNP0A08:00: _OSC: OS requested [PME AER PCIeCapability LTR]
[    0.224900] acpi PNP0A08:00: _OSC: platform willing to grant [LTR]
[    0.225000] acpi PNP0A08:00: _OSC: platform retains control of PCIe features (AE_SUPPORT)
[    0.225665] PCI host bridge to bus 0000:00
[    0.225764] pci_bus 0000:00: root bus resource [io  0x0000-0x0cf7 window]
[    0.225866] pci_bus 0000:00: root bus resource [io  0x0d00-0xffff window]
[    0.225969] pci_bus 0000:00: root bus resource [mem 0x000a0000-0x000bffff window]
[    0.226001] pci_bus 0000:00: root bus resource [mem 0x9f800000-0xefffffff window]
[    0.226110] pci_bus 0000:00: root bus resource [mem 0xfd000000-0xfe7fffff window]
[    0.226215] pci_bus 0000:00: root bus resource [bus 00-3e]
[    0.226338] pci 0000:00:00.0: [8086:5904] type 00 class 0x060000
[    0.226522] pci 0000:00:02.0: [8086:5916] type 00 class 0x030000
[    0.226637] pci 0000:00:02.0: reg 0x10: [mem 0xeb000000-0xebffffff 64bit]
[    0.226750] pci 0000:00:02.0: reg 0x18: [mem 0xa0000000-0xafffffff 64bit pref]
[    0.226862] pci 0000:00:02.0: reg 0x20: [io  0xe000-0xe03f]
[    0.226980] pci 0000:00:02.0: Video device with shadowed ROM at [mem 0x000c0000-0x000dffff]
[    0.227206] pci 0000:00:14.0: [8086:9d2f] type 00 class 0x0c0330
[    0.227329] pci 0000:00:14.0: reg 0x10: [mem 0xec220000-0xec22ffff 64bit]
[    0.227504] pci 0000:00:14.0: PME# supported from D3hot D3cold
[    0.228067] pci 0000:00:14.2: [8086:9d31] type 00 class 0x118000
[    0.228190] pci 0000:00:14.2: reg 0x10: [mem 0xec248000-0xec248fff 64bit]
[    0.228439] pci 0000:00:16.0: [8086:9d3a] type 00 class 0x078000
[    0.228560] pci 0000:00:16.0: reg 0x10: [mem 0xec249000-0xec249fff 64bit]
[    0.228735] pci 0000:00:16.0: PME# supported from D3hot
[    0.229071] pci 0000:00:16.3: [8086:9d3d] type 00 class 0x070002
[    0.229185] pci 0000:00:16.3: reg 0x10: [io  0xe060-0xe067]
[    0.229290] pci 0000:00:16.3: reg 0x14: [mem 0xec24b000-0xec24bfff]
[    0.229544] pci 0000:00:1c.0: [8086:9d10] type 01 class 0x060400
[    0.229722] pci 0000:00:1c.0: PME# supported from D0 D3hot D3cold
[    0.230166] pci 0000:00:1c.6: [8086:9d16] type 01 class 0x060400
[    0.230361] pci 0000:00:1c.6: PME# supported from D0 D3hot D3cold
[    0.230783] pci 0000:00:1d.0: [8086:9d18] type 01 class 0x060400
[    0.230977] pci 0000:00:1d.0: PME# supported from D0 D3hot D3cold
[    0.231323] pci 0000:00:1d.2: [8086:9d1a] type 01 class 0x060400
[    0.231517] pci 0000:00:1d.2: PME# supported from D0 D3hot D3cold
[    0.231950] pci 0000:00:1f.0: [8086:9d4e] type 00 class 0x060100
[    0.232369] pci 0000:00:1f.2: [8086:9d21] type 00 class 0x058000
[    0.232484] pci 0000:00:1f.2: reg 0x10: [mem 0xec244000-0xec247fff]
[    0.232877] pci 0000:00:1f.3: [8086:9d71] type 00 class 0x040300
[    0.233000] pci 0000:00:1f.3: reg 0x10: [mem 0xec240000-0xec243fff 64bit]
[    0.233140] pci 0000:00:1f.3: reg 0x20: [mem 0xec230000-0xec23ffff 64bit]
[    0.233297] pci 0000:00:1f.3: PME# supported from D3hot D3cold
[    0.233688] pci 0000:00:1f.4: [8086:9d23] type 00 class 0x0c0500
[    0.233848] pci 0000:00:1f.4: reg 0x10: [mem 0xec24a000-0xec24a0ff 64bit]
[    0.234017] pci 0000:00:1f.4: reg 0x20: [io  0xefa0-0xefbf]
[    0.234432] pci 0000:00:1f.6: [8086:15d7] type 00 class 0x020000
[    0.234555] pci 0000:00:1f.6: reg 0x10: [mem 0xec200000-0xec21ffff]
[    0.234763] pci 0000:00:1f.6: PME# supported from D0 D3hot D3cold
[    0.235123] pci 0000:00:1c.0: PCI bridge to [bus 02]
[    0.235677] pci 0000:04:00.0: [8086:24fd] type 00 class 0x028000
[    0.236089] pci 0000:04:00.0: reg 0x10: [mem 0xec100000-0xec101fff 64bit]
[    0.236773] pci 0000:04:00.0: PME# supported from D0 D3hot D3cold
[    0.237777] pci 0000:00:1c.6: PCI bridge to [bus 04]
[    0.237877] pci 0000:00:1c.6:   bridge window [mem 0xec100000-0xec1fffff]
[    0.238021] pci 0000:00:1d.0: PCI bridge to [bus 05-3d]
[    0.238120] pci 0000:00:1d.0:   bridge window [mem 0xd4000000-0xea0fffff]
[    0.238225] pci 0000:00:1d.0:   bridge window [mem 0xb0000000-0xd1ffffff 64bit pref]
[    0.238563] pci 0000:3e:00.0: [17aa:0003] type 00 class 0x010802
[    0.238793] pci 0000:3e:00.0: reg 0x10: [mem 0xec000000-0xec003fff 64bit]
[    0.239147] pci 0000:3e:00.0: 15.752 Gb/s available PCIe bandwidth, limited by 8.0 GT/s PCIe x2 link at 0000:00:1d.2 (capable of 31.504 Gb/s with 8.0 GT/s PCIe x4 link)
[    0.239593] pci 0000:00:1d.2: PCI bridge to [bus 3e]
[    0.240005] pci 0000:00:1d.2:   bridge window [mem 0xec000000-0xec0fffff]
[    0.240137] pci_bus 0000:00: on NUMA node 0
[    0.241883] ACPI: PCI: Interrupt link LNKA configured for IRQ 11
[    0.242044] ACPI: PCI: Interrupt link LNKB configured for IRQ 10
[    0.242202] ACPI: PCI: Interrupt link LNKC configured for IRQ 11
[    0.242360] ACPI: PCI: Interrupt link LNKD configured for IRQ 11
[    0.242516] ACPI: PCI: Interrupt link LNKE configured for IRQ 11
[    0.242671] ACPI: PCI: Interrupt link LNKF configured for IRQ 11
[    0.242826] ACPI: PCI: Interrupt link LNKG configured for IRQ 11
[    0.242980] ACPI: PCI: Interrupt link LNKH configured for IRQ 11
[    0.243386] ACPI: EC: interrupt unblocked
[    0.243477] ACPI: EC: event unblocked
[    0.243576] ACPI: EC: EC_CMD/EC_SC=0x66, EC_DATA=0x62
[    0.243672] ACPI: EC: GPE=0x16
[    0.243758] ACPI: \_SB_.PCI0.LPCB.EC__: Boot ECDT EC initialization complete
[    0.243861] ACPI: \_SB_.PCI0.LPCB.EC__: EC: Used to handle transactions and events
[    0.244120] PCI: Using ACPI for IRQ routing
[    0.246478] PCI: pci_cache_line_size set to 64 bytes
[    0.247501] e820: reserve RAM buffer [mem 0x0009d000-0x0009ffff]
[    0.247503] e820: reserve RAM buffer [mem 0x8b79c000-0x8bffffff]
[    0.247504] e820: reserve RAM buffer [mem 0x45e800000-0x45fffffff]
[    0.247524] pci 0000:00:02.0: vgaarb: setting as boot VGA device
[    0.247524] pci 0000:00:02.0: vgaarb: bridge control possible
[    0.247524] pci 0000:00:02.0: vgaarb: VGA device added: decodes=io+mem,owns=io+mem,locks=none
[    0.247524] vgaarb: loaded
[    0.248008] clocksource: Switched to clocksource tsc-early
[    0.248161] pnp: PnP ACPI init
[    0.248307] system 00:00: [mem 0x40000000-0x403fffff] has been reserved
[    0.248514] system 00:01: [mem 0xfd000000-0xfdabffff] has been reserved
[    0.248623] system 00:01: [mem 0xfdad0000-0xfdadffff] has been reserved
[    0.248724] system 00:01: [mem 0xfdb00000-0xfdffffff] has been reserved
[    0.248826] system 00:01: [mem 0xfe000000-0xfe01ffff] has been reserved
[    0.248927] system 00:01: [mem 0xfe036000-0xfe03bfff] has been reserved
[    0.249028] system 00:01: [mem 0xfe03d000-0xfe3fffff] has been reserved
[    0.249134] system 00:01: [mem 0xfe410000-0xfe7fffff] has been reserved
[    0.249461] system 00:02: [io  0xff00-0xfffe] has been reserved
[    0.250401] system 00:03: [io  0x0680-0x069f] has been reserved
[    0.250510] system 00:03: [io  0xffff] has been reserved
[    0.250606] system 00:03: [io  0xffff] has been reserved
[    0.250703] system 00:03: [io  0xffff] has been reserved
[    0.250799] system 00:03: [io  0x1800-0x18fe] has been reserved
[    0.250898] system 00:03: [io  0x164e-0x164f] has been reserved
[    0.251112] system 00:05: [io  0x1854-0x1857] has been reserved
[    0.251327] system 00:08: [io  0x1800-0x189f] could not be reserved
[    0.251434] system 00:08: [io  0x0800-0x087f] has been reserved
[    0.251532] system 00:08: [io  0x0880-0x08ff] has been reserved
[    0.251631] system 00:08: [io  0x0900-0x097f] has been reserved
[    0.251730] system 00:08: [io  0x0980-0x09ff] has been reserved
[    0.251829] system 00:08: [io  0x0a00-0x0a7f] has been reserved
[    0.251927] system 00:08: [io  0x0a80-0x0aff] has been reserved
[    0.252031] system 00:08: [io  0x0b00-0x0b7f] has been reserved
[    0.252135] system 00:08: [io  0x0b80-0x0bff] has been reserved
[    0.252234] system 00:08: [io  0x15e0-0x15ef] has been reserved
[    0.252333] system 00:08: [io  0x1600-0x167f] could not be reserved
[    0.252432] system 00:08: [io  0x1640-0x165f] could not be reserved
[    0.252533] system 00:08: [mem 0xf0000000-0xf3ffffff] has been reserved
[    0.252634] system 00:08: [mem 0xfed10000-0xfed13fff] has been reserved
[    0.252735] system 00:08: [mem 0xfed18000-0xfed18fff] has been reserved
[    0.252836] system 00:08: [mem 0xfed19000-0xfed19fff] has been reserved
[    0.252938] system 00:08: [mem 0xfeb00000-0xfebfffff] has been reserved
[    0.253042] system 00:08: [mem 0xfed20000-0xfed3ffff] has been reserved
[    0.253148] system 00:08: [mem 0xfed90000-0xfed93fff] has been reserved
[    0.253249] system 00:08: [mem 0xeffe0000-0xefffffff] has been reserved
[    0.254282] system 00:09: [mem 0xfdaf0000-0xfdafffff] has been reserved
[    0.254391] system 00:09: [mem 0xfdae0000-0xfdaeffff] has been reserved
[    0.254492] system 00:09: [mem 0xfdac0000-0xfdacffff] has been reserved
[    0.254999] system 00:0a: [mem 0xfed10000-0xfed17fff] could not be reserved
[    0.255113] system 00:0a: [mem 0xfed18000-0xfed18fff] has been reserved
[    0.255214] system 00:0a: [mem 0xfed19000-0xfed19fff] has been reserved
[    0.255315] system 00:0a: [mem 0xf0000000-0xf3ffffff] has been reserved
[    0.255417] system 00:0a: [mem 0xfed20000-0xfed3ffff] has been reserved
[    0.255519] system 00:0a: [mem 0xfed90000-0xfed93fff] has been reserved
[    0.255620] system 00:0a: [mem 0xfed45000-0xfed8ffff] could not be reserved
[    0.255723] system 00:0a: [mem 0xff000000-0xffffffff] could not be reserved
[    0.255825] system 00:0a: [mem 0xfee00000-0xfeefffff] could not be reserved
[    0.255928] system 00:0a: [mem 0xeffe0000-0xefffffff] has been reserved
[    0.256288] pnp 00:0b: disabling [mem 0x000c0000-0x000c3fff] because it overlaps 0000:00:02.0 BAR 6 [mem 0x000c0000-0x000dffff]
[    0.256441] pnp 00:0b: disabling [mem 0x000c8000-0x000cbfff] because it overlaps 0000:00:02.0 BAR 6 [mem 0x000c0000-0x000dffff]
[    0.256586] pnp 00:0b: disabling [mem 0x000d0000-0x000d3fff] because it overlaps 0000:00:02.0 BAR 6 [mem 0x000c0000-0x000dffff]
[    0.256731] pnp 00:0b: disabling [mem 0x000d8000-0x000dbfff] because it overlaps 0000:00:02.0 BAR 6 [mem 0x000c0000-0x000dffff]
[    0.256895] system 00:0b: [mem 0x00000000-0x0009ffff] could not be reserved
[    0.257008] system 00:0b: [mem 0x000e0000-0x000e3fff] could not be reserved
[    0.257115] system 00:0b: [mem 0x000e8000-0x000ebfff] could not be reserved
[    0.257218] system 00:0b: [mem 0x000f0000-0x000fffff] could not be reserved
[    0.257320] system 00:0b: [mem 0x00100000-0x9f7fffff] could not be reserved
[    0.257423] system 00:0b: [mem 0xfec00000-0xfed3ffff] could not be reserved
[    0.257526] system 00:0b: [mem 0xfed4c000-0xffffffff] could not be reserved
[    0.257729] pnp: PnP ACPI: found 12 devices
[    0.264215] clocksource: acpi_pm: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 2085701024 ns
[    0.264383] NET: Registered PF_INET protocol family
[    0.264686] IP idents hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[    0.268414] tcp_listen_portaddr_hash hash table entries: 8192 (order: 5, 131072 bytes, linear)
[    0.268569] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.268683] TCP established hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[    0.268910] TCP bind hash table entries: 65536 (order: 8, 1048576 bytes, linear)
[    0.269140] TCP: Hash tables configured (established 131072 bind 65536)
[    0.269269] UDP hash table entries: 8192 (order: 6, 262144 bytes, linear)
[    0.269407] UDP-Lite hash table entries: 8192 (order: 6, 262144 bytes, linear)
[    0.269578] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.269696] pci 0000:00:1c.0: bridge window [io  0x1000-0x0fff] to [bus 02] add_size 1000
[    0.269812] pci 0000:00:1c.0: bridge window [mem 0x00100000-0x000fffff 64bit pref] to [bus 02] add_size 200000 add_align 100000
[    0.269963] pci 0000:00:1c.0: bridge window [mem 0x00100000-0x000fffff] to [bus 02] add_size 200000 add_align 100000
[    0.270108] pci 0000:00:1d.0: bridge window [io  0x1000-0x0fff] to [bus 05-3d] add_size 1000
[    0.270227] pci 0000:00:1c.0: BAR 8: assigned [mem 0x9f800000-0x9f9fffff]
[    0.270339] pci 0000:00:1c.0: BAR 9: assigned [mem 0x9fa00000-0x9fbfffff 64bit pref]
[    0.270451] pci 0000:00:1c.0: BAR 7: assigned [io  0x2000-0x2fff]
[    0.270556] pci 0000:00:1d.0: BAR 7: assigned [io  0x3000-0x3fff]
[    0.270656] pci 0000:00:1c.0: PCI bridge to [bus 02]
[    0.270759] pci 0000:00:1c.0:   bridge window [io  0x2000-0x2fff]
[    0.270862] pci 0000:00:1c.0:   bridge window [mem 0x9f800000-0x9f9fffff]
[    0.270967] pci 0000:00:1c.0:   bridge window [mem 0x9fa00000-0x9fbfffff 64bit pref]
[    0.271079] pci 0000:00:1c.6: PCI bridge to [bus 04]
[    0.271177] pci 0000:00:1c.6:   bridge window [mem 0xec100000-0xec1fffff]
[    0.271285] pci 0000:00:1d.0: PCI bridge to [bus 05-3d]
[    0.271382] pci 0000:00:1d.0:   bridge window [io  0x3000-0x3fff]
[    0.271483] pci 0000:00:1d.0:   bridge window [mem 0xd4000000-0xea0fffff]
[    0.271586] pci 0000:00:1d.0:   bridge window [mem 0xb0000000-0xd1ffffff 64bit pref]
[    0.271694] pci 0000:00:1d.2: PCI bridge to [bus 3e]
[    0.271790] pci 0000:00:1d.2:   bridge window [mem 0xec000000-0xec0fffff]
[    0.271897] pci_bus 0000:00: resource 4 [io  0x0000-0x0cf7 window]
[    0.271997] pci_bus 0000:00: resource 5 [io  0x0d00-0xffff window]
[    0.272099] pci_bus 0000:00: resource 6 [mem 0x000a0000-0x000bffff window]
[    0.272205] pci_bus 0000:00: resource 7 [mem 0x9f800000-0xefffffff window]
[    0.272308] pci_bus 0000:00: resource 8 [mem 0xfd000000-0xfe7fffff window]
[    0.272410] pci_bus 0000:02: resource 0 [io  0x2000-0x2fff]
[    0.272508] pci_bus 0000:02: resource 1 [mem 0x9f800000-0x9f9fffff]
[    0.272608] pci_bus 0000:02: resource 2 [mem 0x9fa00000-0x9fbfffff 64bit pref]
[    0.272712] pci_bus 0000:04: resource 1 [mem 0xec100000-0xec1fffff]
[    0.272824] pci_bus 0000:05: resource 0 [io  0x3000-0x3fff]
[    0.272922] pci_bus 0000:05: resource 1 [mem 0xd4000000-0xea0fffff]
[    0.273023] pci_bus 0000:05: resource 2 [mem 0xb0000000-0xd1ffffff 64bit pref]
[    0.273132] pci_bus 0000:3e: resource 1 [mem 0xec000000-0xec0fffff]
[    0.274113] PCI: CLS 0 bytes, default 64
[    0.274220] PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
[    0.274327] software IO TLB: mapped [mem 0x000000008779c000-0x000000008b79c000] (64MB)
[    0.274475] RAPL PMU: API unit is 2^-32 Joules, 5 fixed counters, 655360 ms ovfl timer
[    0.274590] RAPL PMU: hw unit of domain pp0-core 2^-14 Joules
[    0.274688] RAPL PMU: hw unit of domain package 2^-14 Joules
[    0.274783] RAPL PMU: hw unit of domain dram 2^-14 Joules
[    0.274877] RAPL PMU: hw unit of domain pp1-gpu 2^-14 Joules
[    0.274973] RAPL PMU: hw unit of domain psys 2^-14 Joules
[    0.275110] resource sanity check: requesting [mem 0xfed10000-0xfed15fff], which spans more than pnp 00:08 [mem 0xfed10000-0xfed13fff]
[    0.275266] caller snb_uncore_imc_init_box+0x73/0xbf mapping multiple BARs
[    0.276075] workingset: timestamp_bits=62 max_order=22 bucket_order=0
[    0.277117] SGI XFS with security attributes, no debug enabled
[    0.277485] io scheduler mq-deadline registered
[    0.277585] io scheduler kyber registered
[    0.278564] intel_idle: max_cstate 1 reached
[    0.279820] nvme nvme0: pci function 0000:3e:00.0
[    0.280170] rtc_cmos 00:04: RTC can wake from S4
[    0.281833] rtc_cmos 00:04: registered as rtc0
[    0.282073] rtc_cmos 00:04: setting system clock to 2022-08-30T15:06:59 UTC (1661872019)
[    0.282201] rtc_cmos 00:04: alarms up to one month, y3k, 242 bytes nvram
[    0.282383] intel_pstate: Intel P-state driver initializing
[    0.282659] intel_pstate: HWP enabled
[    0.282804] NET: Registered PF_PACKET protocol family
[    0.282919] IPI shorthand broadcast: enabled
[    0.283221] sched_clock: Marking stable (256459078, 26740767)->(299733087, -16533242)
[    0.283377] registered taskstats version 1
[    0.294710] nvme nvme0: 4/0/0 default/read/poll queues
[    0.296155]  nvme0n1: p1 p2 < p5 p6 p7 p8 p9 p10 p11 >
[    0.297108] XFS (nvme0n1p5): Mounting V5 Filesystem
[    0.305420] XFS (nvme0n1p5): Ending clean mount
[    0.309277] VFS: Mounted root (xfs filesystem) readonly on device 259:3.
[    0.309544] devtmpfs: mounted
[    0.309736] Freeing unused kernel image (initmem) memory: 792K
[    0.315005] Write protecting the kernel read-only data: 10240k
[    0.315448] Freeing unused kernel image (text/rodata gap) memory: 2044K
[    0.315646] Freeing unused kernel image (rodata/data gap) memory: 724K
[    0.315741] Run /sbin/init as init process
[    0.315823]   with arguments:
[    0.315823]     /sbin/init
[    0.315824]     auto
[    0.315824]   with environment:
[    0.315825]     HOME=/
[    0.315826]     TERM=linux
[    0.315826]     BOOT_IMAGE=Linux
[    0.369259] loop: module loaded
[    0.955010] random: crng init done
[    0.961765] udevd[281]: starting eudev-3.2.11
[    1.012260] input: Sleep Button as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0E:00/input/input0
[    1.012362] ACPI: button: Sleep Button [SLPB]
[    1.012485] input: Lid Switch as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0C0D:00/input/input1
[    1.012582] ACPI: button: Lid Switch [LID]
[    1.012702] input: Power Button as /devices/LNXSYSTM:00/LNXPWRBN:00/input/input2
[    1.012796] ACPI: button: Power Button [PWRF]
[    1.051503] ACPI: AC: AC Adapter [AC] (on-line)
[    1.051825] i8042: PNP: PS/2 Controller [PNP0303:KBD,PNP0f13:MOU] at 0x60,0x64 irq 1,12
[    1.053852] serio: i8042 KBD port at 0x60,0x64 irq 1
[    1.053943] serio: i8042 AUX port at 0x60,0x64 irq 12
[    1.071720] ACPI: battery: Slot [BAT0] (battery present)
[    1.088539] Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
[    1.088583] thermal LNXTHERM:00: registered as thermal_zone0
[    1.088729] ACPI: thermal: Thermal Zone [THM0] (48 C)
[    1.088783] serial8250: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[    1.089957] ACPI: bus type USB registered
[    1.090067] usbcore: registered new interface driver usbfs
[    1.090173] usbcore: registered new interface driver hub
[    1.090273] usbcore: registered new device driver usb
[    1.091221] ACPI: bus type drm_connector registered
[    1.091429] 0000:00:16.3: ttyS1 at I/O 0xe060 (irq = 19, base_baud = 115200) is a 16550A
[    1.092049] xhci_hcd 0000:00:14.0: xHCI Host Controller
[    1.092147] xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 1
[    1.093319] xhci_hcd 0000:00:14.0: hcc params 0x200077c1 hci version 0x100 quirks 0x0000000081109810
[    1.093719] xhci_hcd 0000:00:14.0: xHCI Host Controller
[    1.093809] xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 2
[    1.093905] xhci_hcd 0000:00:14.0: Host supports USB 3.0 SuperSpeed
[    1.094147] hub 1-0:1.0: USB hub found
[    1.094245] hub 1-0:1.0: 12 ports detected
[    1.095875] hub 2-0:1.0: USB hub found
[    1.095968] hub 2-0:1.0: 6 ports detected
[    1.097087] usb: port power management may be unreliable
[    1.107360] pps_core: LinuxPPS API ver. 1 registered
[    1.107451] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    1.107925] i801_smbus 0000:00:1f.4: SPD Write Disable is set
[    1.108066] i801_smbus 0000:00:1f.4: SMBus using PCI interrupt
[    1.108185] PTP clock support registered
[    1.108201] pci 0000:00:1f.1: [8086:9d20] type 00 class 0x058000
[    1.108421] pci 0000:00:1f.1: reg 0x10: [mem 0xfd000000-0xfdffffff 64bit]
[    1.110176] e1000e: Intel(R) PRO/1000 Network Driver
[    1.110266] i2c i2c-0: 2/2 memory slots populated (from DMI)
[    1.110276] e1000e: Copyright(c) 1999 - 2015 Intel Corporation.
[    1.110649] e1000e 0000:00:1f.6: Interrupt Throttling Rate (ints/sec) set to dynamic conservative mode
[    1.110740] i2c i2c-0: Successfully instantiated SPD at 0x50
[    1.111254] i2c i2c-0: Successfully instantiated SPD at 0x51
[    1.134257] cryptd: max_cpu_qlen set to 1000
[    1.136637] AVX2 version of gcm_enc/dec engaged.
[    1.136736] AES CTR mode by8 optimization enabled
[    1.182882] i915 0000:00:02.0: vgaarb: deactivate vga console
[    1.184330] e1000e 0000:00:1f.6 0000:00:1f.6 (uninitialized): registered PHC clock
[    1.184933] input: AT Translated Set 2 keyboard as /devices/platform/i8042/serio0/input/input3
[    1.186926] Console: switching to colour dummy device 80x25
[    1.187505] i915 0000:00:02.0: vgaarb: changed VGA decodes: olddecodes=io+mem,decodes=io+mem:owns=io+mem
[    1.188752] i915 0000:00:02.0: [drm] Finished loading DMC firmware i915/kbl_dmc_ver1_04.bin (v1.4)
[    1.245901] e1000e 0000:00:1f.6 eth0: (PCI Express:2.5GT/s:Width x1) 8c:16:45:b8:37:51
[    1.245907] e1000e 0000:00:1f.6 eth0: Intel(R) PRO/1000 Network Connection
[    1.245985] e1000e 0000:00:1f.6 eth0: MAC: 12, PHY: 12, PBA No: 1000FF-0FF
[    1.246369] [drm] Initialized i915 1.6.0 20201103 for 0000:00:02.0 on minor 0
[    1.248027] ACPI: video: Video Device [GFX0] (multi-head: yes  rom: no  post: no)
[    1.248224] input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input5
[    1.311027] tsc: Refined TSC clocksource calibration: 2712.009 MHz
[    1.311048] clocksource: tsc: mask: 0xffffffffffffffff max_cycles: 0x27178ec3e42, max_idle_ns: 440795287235 ns
[    1.311296] clocksource: Switched to clocksource tsc
[    1.342015] usb 1-4: new full-speed USB device number 2 using xhci_hcd
[    1.368949] fbcon: i915drmfb (fb0) is primary device
[    1.372185] Console: switching to colour frame buffer device 240x67
[    1.393806] i915 0000:00:02.0: [drm] fb0: i915drmfb frame buffer device
[    1.434467] Adding 6519124k swap on /dev/nvme0n1p11.  Priority:-2 extents:1 across:6519124k SS
[    1.473400] usbcore: registered new interface driver usbserial_generic
[    1.473464] usbserial: USB Serial support registered for generic
[    1.474497] usbcore: registered new interface driver pl2303
[    1.474626] usbserial: USB Serial support registered for pl2303
[    1.474701] pl2303 1-4:1.0: pl2303 converter detected
[    1.475356] usb 1-4: pl2303 converter now attached to ttyUSB0
[    1.582351] usb 2-1: new SuperSpeed USB device number 2 using xhci_hcd
[    1.632090] xfs filesystem being remounted at / supports timestamps until 2038 (0x7fffffff)
[    1.675505] XFS (nvme0n1p1): Mounting V5 Filesystem
[    1.690308] XFS (nvme0n1p1): Ending clean mount
[    1.691584] xfs filesystem being mounted at /boot supports timestamps until 2038 (0x7fffffff)
[    1.692139] XFS (nvme0n1p6): Mounting V5 Filesystem
[    1.707886] XFS (nvme0n1p6): Ending clean mount
[    1.709007] xfs filesystem being mounted at /tmp supports timestamps until 2038 (0x7fffffff)
[    1.709663] XFS (nvme0n1p7): Mounting V5 Filesystem
[    1.710037] usb 1-7: new full-speed USB device number 3 using xhci_hcd
[    1.825119] XFS (nvme0n1p7): Ending clean mount
[    1.826263] xfs filesystem being mounted at /var supports timestamps until 2038 (0x7fffffff)
[    1.826976] XFS (nvme0n1p8): Mounting V5 Filesystem
[    1.840314] XFS (nvme0n1p8): Ending clean mount
[    1.843365] xfs filesystem being mounted at /root supports timestamps until 2038 (0x7fffffff)
[    1.845912] XFS (nvme0n1p9): Mounting V5 Filesystem
[    1.859042] XFS (nvme0n1p9): Ending clean mount
[    1.861951] xfs filesystem being mounted at /usr/src supports timestamps until 2038 (0x7fffffff)
[    1.864541] XFS (nvme0n1p10): Mounting V5 Filesystem
[    1.876070] XFS (nvme0n1p10): Ending clean mount
[    1.879264] xfs filesystem being mounted at /home supports timestamps until 2038 (0x7fffffff)
[    1.927793] ax88179_178a 2-1:1.0 eth1: register 'ax88179_178a' at usb-0000:00:14.0-1, ASIX AX88179 USB 3.0 Gigabit Ethernet, 00:0e:c6:81:79:01
[    1.929052] usbcore: registered new interface driver ax88179_178a
[    1.950140] usb 2-3: new SuperSpeed USB device number 3 using xhci_hcd
[    1.981133] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[    1.982922] SCSI subsystem initialized
[    1.984333] usb-storage 2-3:1.0: USB Mass Storage device detected
[    1.984439] scsi host0: usb-storage 2-3:1.0
[    1.984596] usbcore: registered new interface driver usb-storage
[    2.081009] usb 1-8: new high-speed USB device number 4 using xhci_hcd
[    3.043664] scsi 0:0:0:0: Direct-Access     Generic- SD/MMC           1.00 PQ: 0 ANSI: 6
[    3.052917] sd 0:0:0:0: [sda] Media removed, stopped polling
[    3.052998] sd 0:0:0:0: [sda] Attached SCSI removable disk
[    5.776275] gre: GRE over IPv4 demultiplexor driver
[    5.776674] ip_gre: GRE over IPv4 tunneling driver
[    6.109040] br0: port 1(xs4mobile) entered blocking state
[    6.109052] br0: port 1(xs4mobile) entered disabled state
[    6.109165] device xs4mobile entered promiscuous mode
[    6.109275] br0: port 1(xs4mobile) entered blocking state
[    6.109281] br0: port 1(xs4mobile) entered forwarding state
[    6.114550] br0: port 2(eth1) entered blocking state
[    6.114560] br0: port 2(eth1) entered disabled state
[    6.114685] device eth1 entered promiscuous mode
[    7.405812] e1000e 0000:00:1f.6 eth0: NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None
[    9.767378] ax88179_178a 2-1:1.0 eth1: ax88179 - Link status is: 1
[    9.773432] br0: port 2(eth1) entered blocking state
[    9.773442] br0: port 2(eth1) entered forwarding state
[154958.141754] usb 2-1: USB disconnect, device number 2
[154958.141939] xhci_hcd 0000:00:14.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
[154958.142062] ax88179_178a 2-1:1.0 eth1: unregister 'ax88179_178a' usb-0000:00:14.0-1, ASIX AX88179 USB 3.0 Gigabit Ethernet
[154958.142101] ax88179_178a 2-1:1.0 eth1: Failed to read reg index 0x0002: -19
[154958.142111] ax88179_178a 2-1:1.0 eth1: Failed to write reg index 0x0002: -19
[154958.142163] br0: port 2(eth1) entered disabled state
[154958.142337] device eth1 left promiscuous mode
[154958.142343] br0: port 2(eth1) entered disabled state
[154958.159771] ax88179_178a 2-1:1.0 eth1 (unregistered): Failed to write reg index 0x0002: -19
[154958.159786] ax88179_178a 2-1:1.0 eth1 (unregistered): Failed to write reg index 0x0001: -19
[154958.159794] ax88179_178a 2-1:1.0 eth1 (unregistered): Failed to write reg index 0x0002: -19
[154958.381910] usb 2-1: new SuperSpeed USB device number 4 using xhci_hcd
[154958.724429] ax88179_178a 2-1:1.0 eth1: register 'ax88179_178a' at usb-0000:00:14.0-1, ASIX AX88179 USB 3.0 Gigabit Ethernet, 00:0e:c6:81:79:01
Comment 204 Marco Berizzi 2022-09-02 15:06:50 UTC
Hello everyone,

unfortunately it happened again (system started without parameters):

[    9.561808] br0: port 2(eth1) entered forwarding state
[95735.974041] usb 2-1: USB disconnect, device number 2
[95735.974215] xhci_hcd 0000:00:14.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
[95735.974439] xhci_hcd 0000:00:14.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
[95735.974471] ax88179_178a 2-1:1.0 eth1: unregister 'ax88179_178a' usb-0000:00:14.0-1, ASIX AX88179 USB 3.0 Gigabit Ethernet
[95735.974523] ax88179_178a 2-1:1.0 eth1: Failed to read reg index 0x0002: -19
[95735.974532] ax88179_178a 2-1:1.0 eth1: Failed to write reg index 0x0002: -19
[95735.974595] br0: port 2(eth1) entered disabled state
[95735.974783] device eth1 left promiscuous mode
[95735.974790] br0: port 2(eth1) entered disabled state
[95735.992489] ax88179_178a 2-1:1.0 eth1 (unregistered): Failed to write reg index 0x0002: -19
[95735.992503] ax88179_178a 2-1:1.0 eth1 (unregistered): Failed to write reg index 0x0001: -19
[95735.992510] ax88179_178a 2-1:1.0 eth1 (unregistered): Failed to write reg index 0x0002: -19
[95736.215301] usb 2-1: new SuperSpeed USB device number 4 using xhci_hcd
[95736.566562] ax88179_178a 2-1:1.0 eth1: register 'ax88179_178a' at usb-0000:00:14.0-1, ASIX AX88179 USB 3.0 Gigabit Ethernet, 00:0e:c6:81:79:01

Marco
Comment 205 Sean Kennedy 2022-09-03 17:24:25 UTC
I also have the issue.  Using Proxmox 7.2 (Debian Bullseye) with a Lenovo M910q core-i7-7700T,  using two TPLink UE300 (RTL8153) USB to 1Gbe Ethernet adapters. Each one is stable in a lower USB slot. Swapping the adapters does not change the behavior and only impacts the USB device in the higher slot.  Changes to different ports without change.

Easily reproducible with the following commands.  Basically I'm trying to plumb bond0 again,  which works initially, I get the xhci_hcd warning, and the link is down again.  System details are also below.

root@higgins:~# dmesg -C ; ifup -a ; ip link | grep enx ; \
> dmesg -H ; dmesg -C ; sleep 70 ;                       \ 
> ip link | grep enx ; dmesg -H
3: enxd03745be5afc: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond0 state UP mode DEFAULT group default qlen 1000
16: enx54af9786ab11: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond0 state UP mode DEFAULT group default qlen 1000

[Sep 3 11:05] device enx54af9786ab11 entered promiscuous mode
[  +0.001236] bond0: (slave enx54af9786ab11): Enslaving as a backup interface with a down link
[  +0.006363] vmbr0: the hash_elasticity option has been deprecated and is always 16
[  +0.013972] r8152 2-4:1.0 enx54af9786ab11: Promiscuous mode enabled
[  +0.001344] r8152 2-4:1.0 enx54af9786ab11: carrier on

3: enxd03745be5afc: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond0 state UP mode DEFAULT group default qlen 1000
17: enx54af9786ab11: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000

[Sep 3 11:05] bond0: (slave enx54af9786ab11): link status definitely up, 1000 Mbps full duplex
[Sep 3 11:06] usb 2-4: USB disconnect, device number 12
[  +0.001544] xhci_hcd 0000:00:14.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
[  +0.001435] bond0: (slave enx54af9786ab11): Releasing backup interface
[  +0.029081] device enx54af9786ab11 left promiscuous mode
[  +0.316190] usb 2-4: new SuperSpeed USB device number 13 using xhci_hcd
[  +0.022053] usb 2-4: New USB device found, idVendor=2357, idProduct=0601, bcdDevice=30.00
[  +0.001297] usb 2-4: New USB device strings: Mfr=1, Product=2, SerialNumber=6
[  +0.001337] usb 2-4: Product: USB 10/100/1000 LAN
[  +0.001261] usb 2-4: Manufacturer: TP-Link
[  +0.001208] usb 2-4: SerialNumber: 000001
[  +0.137200] usb 2-4: reset SuperSpeed USB device number 13 using xhci_hcd
[  +0.049197] r8152 2-4:1.0: load rtl8153a-4 v2 02/07/20 successfully
[  +0.030905] r8152 2-4:1.0 eth0: v1.12.12
[  +0.007834] r8152 2-4:1.0 enx54af9786ab11: renamed from eth0
root@higgins:~#


-------
System Details
------- 


root@higgins:~# uname -a
Linux higgins 5.15.39-4-pve #1 SMP PVE 5.15.39-4 (Mon, 08 Aug 2022 15:11:15 +0200) x86_64 GNU/Linux

root@higgins:~# lspci -k -nn | grep -B2 xhci
00:14.0 USB controller [0c03]: Intel Corporation 200 Series/Z370 Chipset Family USB 3.0 xHCI Controller [8086:a2af]
        Subsystem: Lenovo 200 Series/Z370 Chipset Family USB 3.0 xHCI Controller [17aa:310b]
        Kernel driver in use: xhci_hcd
        Kernel modules: xhci_pci

root@higgins:~# lsusb -tv
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/10p, 5000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
    |__ Port 1: Dev 2, If 0, Class=Vendor Specific Class, Driver=r8152, 5000M
        ID 2357:0601 TP-Link UE300 10/100/1000 LAN (ethernet mode) [Realtek RTL8153]
    |__ Port 4: Dev 13, If 0, Class=Vendor Specific Class, Driver=r8152, 5000M
        ID 2357:0601 TP-Link UE300 10/100/1000 LAN (ethernet mode) [Realtek RTL8153]
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/16p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub

root@higgins:~# modinfo r8152
filename:       /lib/modules/5.15.39-4-pve/kernel/drivers/net/usb/r8152.ko
version:        v1.12.12
license:        GPL
description:    Realtek RTL8152/RTL8153 Based USB Ethernet Adapters
author:         Realtek linux nic maintainers <nic_swsd@realtek.com>
firmware:       rtl_nic/rtl8156b-2.fw
firmware:       rtl_nic/rtl8156a-2.fw
firmware:       rtl_nic/rtl8153c-1.fw
firmware:       rtl_nic/rtl8153b-2.fw
firmware:       rtl_nic/rtl8153a-4.fw
firmware:       rtl_nic/rtl8153a-3.fw
firmware:       rtl_nic/rtl8153a-2.fw
srcversion:     9144C27A9617457A5BEE55E
alias:          usb:v2357p0601d*dc*dsc*dp*ic02isc06ip00in*
alias:          usb:v2357p0601d*dc*dsc*dp*icFFisc*ip*in*
alias:          usb:v0955p09FFd*dc*dsc*dp*ic02isc06ip00in*
alias:          usb:v0955p09FFd*dc*dsc*dp*icFFisc*ip*in*
alias:          usb:v13B1p0041d*dc*dsc*dp*ic02isc06ip00in*
alias:          usb:v13B1p0041d*dc*dsc*dp*icFFisc*ip*in*
alias:          usb:v17EFpA387d*dc*dsc*dp*ic02isc06ip00in*
alias:          usb:v17EFpA387d*dc*dsc*dp*icFFisc*ip*in*
alias:          usb:v17EFp721Ed*dc*dsc*dp*ic02isc06ip00in*
alias:          usb:v17EFp721Ed*dc*dsc*dp*icFFisc*ip*in*
alias:          usb:v17EFp7214d*dc*dsc*dp*ic02isc06ip00in*
alias:          usb:v17EFp7214d*dc*dsc*dp*icFFisc*ip*in*
alias:          usb:v17EFp720Cd*dc*dsc*dp*ic02isc06ip00in*
alias:          usb:v17EFp720Cd*dc*dsc*dp*icFFisc*ip*in*
alias:          usb:v17EFp7205d*dc*dsc*dp*ic02isc06ip00in*
alias:          usb:v17EFp7205d*dc*dsc*dp*icFFisc*ip*in*
alias:          usb:v17EFp3082d*dc*dsc*dp*ic02isc06ip00in*
alias:          usb:v17EFp3082d*dc*dsc*dp*icFFisc*ip*in*
alias:          usb:v17EFp3069d*dc*dsc*dp*ic02isc06ip00in*
alias:          usb:v17EFp3069d*dc*dsc*dp*icFFisc*ip*in*
alias:          usb:v17EFp3062d*dc*dsc*dp*ic02isc06ip00in*
alias:          usb:v17EFp3062d*dc*dsc*dp*icFFisc*ip*in*
alias:          usb:v17EFp304Fd*dc*dsc*dp*ic02isc06ip00in*
alias:          usb:v17EFp304Fd*dc*dsc*dp*icFFisc*ip*in*
alias:          usb:v04E8pA101d*dc*dsc*dp*ic02isc06ip00in*
alias:          usb:v04E8pA101d*dc*dsc*dp*icFFisc*ip*in*
alias:          usb:v045Ep0927d*dc*dsc*dp*ic02isc06ip00in*
alias:          usb:v045Ep0927d*dc*dsc*dp*icFFisc*ip*in*
alias:          usb:v045Ep07C6d*dc*dsc*dp*ic02isc06ip00in*
alias:          usb:v045Ep07C6d*dc*dsc*dp*icFFisc*ip*in*
alias:          usb:v045Ep07ABd*dc*dsc*dp*ic02isc06ip00in*
alias:          usb:v045Ep07ABd*dc*dsc*dp*icFFisc*ip*in*
alias:          usb:v0BDAp8156d*dc*dsc*dp*ic02isc06ip00in*
alias:          usb:v0BDAp8156d*dc*dsc*dp*icFFisc*ip*in*
alias:          usb:v0BDAp8155d*dc*dsc*dp*ic02isc06ip00in*
alias:          usb:v0BDAp8155d*dc*dsc*dp*icFFisc*ip*in*
alias:          usb:v0BDAp8153d*dc*dsc*dp*ic02isc06ip00in*
alias:          usb:v0BDAp8153d*dc*dsc*dp*icFFisc*ip*in*
alias:          usb:v0BDAp8152d*dc*dsc*dp*ic02isc06ip00in*
alias:          usb:v0BDAp8152d*dc*dsc*dp*icFFisc*ip*in*
alias:          usb:v0BDAp8053d*dc*dsc*dp*ic02isc06ip00in*
alias:          usb:v0BDAp8053d*dc*dsc*dp*icFFisc*ip*in*
alias:          usb:v0BDAp8050d*dc*dsc*dp*ic02isc06ip00in*
alias:          usb:v0BDAp8050d*dc*dsc*dp*icFFisc*ip*in*
depends:        mii
retpoline:      Y
intree:         Y
name:           r8152
vermagic:       5.15.39-4-pve SMP mod_unload modversions

root@higgins:~# tail -1000 /var/log/messages | grep usb | grep 09:39
Sep  3 09:39:26 higgins kernel: [    1.547421] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002, bcdDevice= 5.15
Sep  3 09:39:26 higgins kernel: [    1.547426] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
Sep  3 09:39:26 higgins kernel: [    1.547429] usb usb1: Product: xHCI Host Controller
Sep  3 09:39:26 higgins kernel: [    1.547431] usb usb1: Manufacturer: Linux 5.15.39-4-pve xhci-hcd
Sep  3 09:39:26 higgins kernel: [    1.547434] usb usb1: SerialNumber: 0000:00:14.0
Sep  3 09:39:26 higgins kernel: [    1.549759] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003, bcdDevice= 5.15
Sep  3 09:39:26 higgins kernel: [    1.549763] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
Sep  3 09:39:26 higgins kernel: [    1.549766] usb usb2: Product: xHCI Host Controller
Sep  3 09:39:26 higgins kernel: [    1.549769] usb usb2: Manufacturer: Linux 5.15.39-4-pve xhci-hcd
Sep  3 09:39:26 higgins kernel: [    1.549771] usb usb2: SerialNumber: 0000:00:14.0
Sep  3 09:39:26 higgins kernel: [    1.551090] usb: port power management may be unreliable
Sep  3 09:39:26 higgins kernel: [    1.889622] usb 2-1: new SuperSpeed USB device number 2 using xhci_hcd
Sep  3 09:39:26 higgins kernel: [    1.912268] usb 2-1: New USB device found, idVendor=2357, idProduct=0601, bcdDevice=30.00
Sep  3 09:39:26 higgins kernel: [    1.912273] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=6
Sep  3 09:39:26 higgins kernel: [    1.912276] usb 2-1: Product: USB 10/100/1000 LAN
Sep  3 09:39:26 higgins kernel: [    1.912278] usb 2-1: Manufacturer: TP-LINK
Sep  3 09:39:26 higgins kernel: [    1.912280] usb 2-1: SerialNumber: 000001000000
Sep  3 09:39:26 higgins kernel: [    2.045666] usb 2-4: new SuperSpeed USB device number 3 using xhci_hcd
Sep  3 09:39:26 higgins kernel: [    2.068477] usb 2-4: New USB device found, idVendor=2357, idProduct=0601, bcdDevice=30.00
Sep  3 09:39:26 higgins kernel: [    2.068498] usb 2-4: New USB device strings: Mfr=1, Product=2, SerialNumber=6
Sep  3 09:39:26 higgins kernel: [    2.068514] usb 2-4: Product: USB 10/100/1000 LAN
Sep  3 09:39:26 higgins kernel: [    2.068525] usb 2-4: Manufacturer: TP-Link
Sep  3 09:39:26 higgins kernel: [    2.068535] usb 2-4: SerialNumber: 000001
Sep  3 09:39:26 higgins kernel: [    4.110138] usbcore: registered new interface driver r8152
Sep  3 09:39:26 higgins kernel: [    4.198806] usbcore: registered new interface driver cdc_ether
Sep  3 09:39:26 higgins kernel: [    4.282161] usb 2-1: reset SuperSpeed USB device number 2 using xhci_hcd
Sep  3 09:39:26 higgins kernel: [    4.429911] usb 2-4: reset SuperSpeed USB device number 3 using xhci_hcd
Comment 206 Sean Kennedy 2022-09-07 19:13:51 UTC
(In reply to Sean Kennedy from comment #205)
> I also have the issue.  Using Proxmox 7.2 (Debian Bullseye) with a Lenovo
> M910q core-i7-7700T,  using two TPLink UE300 (RTL8153) USB to 1Gbe Ethernet
> adapters. Each one is stable in a lower USB slot. Swapping the adapters does
> not change the behavior and only impacts the USB device in the higher slot. 
> Changes to different ports without change.

Update - Tried a different dongle - a 2.5Gbe and have two hard drives attached to the system.  Doesn't matter where the 2.5Gbe dongle is attached,  it eventually errors with "WARN Set TR Deq Ptr cmd failed"  And the error rate is only around six times a day right now:

8156 Realtek Semiconductor Corp. USB 10/100/1G/2.5G LAN

# dmesg -T | grep xhci
[Tue Sep  6 13:37:13 2022] xhci_hcd 0000:00:14.0: xHCI Host Controller
[Tue Sep  6 13:37:13 2022] xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 1
[Tue Sep  6 13:37:13 2022] xhci_hcd 0000:00:14.0: hcc params 0x200077c1 hci version 0x100 quirks 0x0000000000009810
[Tue Sep  6 13:37:13 2022] usb usb1: Manufacturer: Linux 5.15.39-4-pve xhci-hcd
[Tue Sep  6 13:37:13 2022] xhci_hcd 0000:00:14.0: xHCI Host Controller
[Tue Sep  6 13:37:13 2022] xhci_hcd 0000:00:14.0: new USB bus registered, assigned bus number 2
[Tue Sep  6 13:37:13 2022] xhci_hcd 0000:00:14.0: Host supports USB 3.0 SuperSpeed
[Tue Sep  6 13:37:13 2022] usb usb2: Manufacturer: Linux 5.15.39-4-pve xhci-hcd
[Tue Sep  6 13:37:13 2022] usb 2-1: new SuperSpeed USB device number 2 using xhci_hcd
[Tue Sep  6 13:37:14 2022] usb 2-3: new SuperSpeed USB device number 3 using xhci_hcd
[Tue Sep  6 13:37:14 2022] usb 2-4: new SuperSpeed USB device number 4 using xhci_hcd
[Tue Sep  6 14:39:22 2022] xhci_hcd 0000:00:14.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
[Tue Sep  6 14:39:22 2022] usb 2-4: new SuperSpeed USB device number 5 using xhci_hcd
[Tue Sep  6 18:44:01 2022] xhci_hcd 0000:00:14.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
[Tue Sep  6 18:44:01 2022] xhci_hcd 0000:00:14.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
[Tue Sep  6 18:44:02 2022] usb 2-4: new SuperSpeed USB device number 6 using xhci_hcd
[Tue Sep  6 22:19:06 2022] xhci_hcd 0000:00:14.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
[Tue Sep  6 22:19:07 2022] usb 2-4: new SuperSpeed USB device number 7 using xhci_hcd


Since this drops the device from the system and offlines the link,  I created a simple script to detect zero UP ethernet devices via cron once a minute and runs a ifnet -a.   It's clunky but works.  

crontab:
# m h  dom mon dow   command
* * * * * /root/fixnet.sh >/dev/null 2>&1

fixnet.sh:
#!/bin/sh

STATE=`ip link | grep " enx" | grep UP | wc -l`
if [ $STATE -gt 0 ]; then
  # All good.  Exit
  exit 0
fi

/usr/sbin/ifup -a
sleep 20

ping -c 1 10.0.0.1 | grep "1 received"
if [ $? -eq 0 ]; then
  # Network looks good. Exit.
  exit 0
fi

sleep 310
ping -c 1 10.0.0.1 | grep "1 received"
if [ $? -ne 0 ]; then
  # The network is still down.
  systemctl reboot
fi
Comment 207 James H 2022-12-21 15:58:05 UTC
I'm using a 2.5gb ethernet usb device and getting this error intermittently (a dozen times per day).

$ uname -a
Linux hephaestus 5.4.0-135-generic #152-Ubuntu SMP Wed Nov 23 20:19:22 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux


$ lsusb
<snip>
Bus 003 Device 016: ID 0bda:8156 Realtek Semiconductor Corp. USB 10/100/1G/2.5G 



This is what plays out via /var/log/syslog each time:

Dec 21 10:26:47 hephaestus kernel: [346923.166782] usb 3-4: USB disconnect, device number 15
Dec 21 10:26:47 hephaestus kernel: [346923.166913] xhci_hcd 0000:00:14.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
Dec 21 10:26:47 hephaestus kernel: [346923.166927] cdc_ncm 3-4:2.0 eth1: unregister 'cdc_ncm' usb-0000:00:14.0-4, CDC NCM
Dec 21 10:26:47 hephaestus kernel: [346923.167071] xhci_hcd 0000:00:14.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
Dec 21 10:26:47 hephaestus kernel: [346923.170644] xhci_hcd 0000:00:14.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
Dec 21 10:26:47 hephaestus dhclient[320734]: receive_packet failed on eth1: Network is down
Dec 21 10:26:47 hephaestus systemd[1]: Stopping ifup for eth1...
Dec 21 10:26:47 hephaestus dhclient[325522]: Killed old client process
Dec 21 10:26:47 hephaestus ifdown[325522]: Killed old client process
Dec 21 10:26:47 hephaestus kernel: [346923.478913] usb 3-4: new SuperSpeed Gen 1 USB device number 16 using xhci_hcd
Dec 21 10:26:47 hephaestus kernel: [346923.499567] usb 3-4: New USB device found, idVendor=0bda, idProduct=8156, bcdDevice=31.00
Dec 21 10:26:47 hephaestus kernel: [346923.499573] usb 3-4: New USB device strings: Mfr=1, Product=2, SerialNumber=6
Dec 21 10:26:47 hephaestus kernel: [346923.499577] usb 3-4: Product: USB 10/100/1G/2.5G LAN
Dec 21 10:26:47 hephaestus kernel: [346923.499580] usb 3-4: Manufacturer: Realtek
Dec 21 10:26:47 hephaestus kernel: [346923.499583] usb 3-4: SerialNumber: 001000001
Dec 21 10:26:47 hephaestus kernel: [346923.523736] cdc_ncm 3-4:2.0: MAC-Address: xx:xx:xx:xx:xx:xx
Dec 21 10:26:47 hephaestus kernel: [346923.523742] cdc_ncm 3-4:2.0: setting rx_max = 16384
Dec 21 10:26:47 hephaestus kernel: [346923.523836] cdc_ncm 3-4:2.0: setting tx_max = 16384
Dec 21 10:26:47 hephaestus kernel: [346923.524578] cdc_ncm 3-4:2.0 eth1: register 'cdc_ncm' at usb-0000:00:14.0-4, CDC NCM, xx:xx:xx:xx:xx:xx
Dec 21 10:26:47 hephaestus systemd-udevd[325501]: Using default interface naming scheme 'v245'.
Dec 21 10:26:47 hephaestus systemd-udevd[325501]: ethtool: autonegotiation is unset or enabled, the speed and duplex are not writable.
Dec 21 10:26:47 hephaestus systemd[1]: Found device USB_10_100_1G_2.5G_LAN.
(then things start back up and the ethernet link goes live again after about 10 seconds)
Comment 208 James H 2023-01-03 13:41:44 UTC
FYI: I have built a kernel with the previously (on this thread) discussed patch (on a 5.4 kernel) and I still have the error multiple times per day.


(In reply to James H from comment #207)
> I'm using a 2.5gb ethernet usb device and getting this error intermittently
> (a dozen times per day).
> 
> $ uname -a
> Linux hephaestus 5.4.0-135-generic #152-Ubuntu SMP Wed Nov 23 20:19:22 UTC
> 2022 x86_64 x86_64 x86_64 GNU/Linux
> 
> 
> $ lsusb
> <snip>
> Bus 003 Device 016: ID 0bda:8156 Realtek Semiconductor Corp. USB
> 10/100/1G/2.5G 
> 
> 
> 
> This is what plays out via /var/log/syslog each time:
> 
> Dec 21 10:26:47 hephaestus kernel: [346923.166782] usb 3-4: USB disconnect,
> device number 15
> Dec 21 10:26:47 hephaestus kernel: [346923.166913] xhci_hcd 0000:00:14.0:
> WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
> Dec 21 10:26:47 hephaestus kernel: [346923.166927] cdc_ncm 3-4:2.0 eth1:
> unregister 'cdc_ncm' usb-0000:00:14.0-4, CDC NCM
> Dec 21 10:26:47 hephaestus kernel: [346923.167071] xhci_hcd 0000:00:14.0:
> WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
> Dec 21 10:26:47 hephaestus kernel: [346923.170644] xhci_hcd 0000:00:14.0:
> WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
> Dec 21 10:26:47 hephaestus dhclient[320734]: receive_packet failed on eth1:
> Network is down
> Dec 21 10:26:47 hephaestus systemd[1]: Stopping ifup for eth1...
> Dec 21 10:26:47 hephaestus dhclient[325522]: Killed old client process
> Dec 21 10:26:47 hephaestus ifdown[325522]: Killed old client process
> Dec 21 10:26:47 hephaestus kernel: [346923.478913] usb 3-4: new SuperSpeed
> Gen 1 USB device number 16 using xhci_hcd
> Dec 21 10:26:47 hephaestus kernel: [346923.499567] usb 3-4: New USB device
> found, idVendor=0bda, idProduct=8156, bcdDevice=31.00
> Dec 21 10:26:47 hephaestus kernel: [346923.499573] usb 3-4: New USB device
> strings: Mfr=1, Product=2, SerialNumber=6
> Dec 21 10:26:47 hephaestus kernel: [346923.499577] usb 3-4: Product: USB
> 10/100/1G/2.5G LAN
> Dec 21 10:26:47 hephaestus kernel: [346923.499580] usb 3-4: Manufacturer:
> Realtek
> Dec 21 10:26:47 hephaestus kernel: [346923.499583] usb 3-4: SerialNumber:
> 001000001
> Dec 21 10:26:47 hephaestus kernel: [346923.523736] cdc_ncm 3-4:2.0:
> MAC-Address: xx:xx:xx:xx:xx:xx
> Dec 21 10:26:47 hephaestus kernel: [346923.523742] cdc_ncm 3-4:2.0: setting
> rx_max = 16384
> Dec 21 10:26:47 hephaestus kernel: [346923.523836] cdc_ncm 3-4:2.0: setting
> tx_max = 16384
> Dec 21 10:26:47 hephaestus kernel: [346923.524578] cdc_ncm 3-4:2.0 eth1:
> register 'cdc_ncm' at usb-0000:00:14.0-4, CDC NCM, xx:xx:xx:xx:xx:xx
> Dec 21 10:26:47 hephaestus systemd-udevd[325501]: Using default interface
> naming scheme 'v245'.
> Dec 21 10:26:47 hephaestus systemd-udevd[325501]: ethtool: autonegotiation
> is unset or enabled, the speed and duplex are not writable.
> Dec 21 10:26:47 hephaestus systemd[1]: Found device USB_10_100_1G_2.5G_LAN.
> (then things start back up and the ethernet link goes live again after about
> 10 seconds)
Comment 209 Sven Mohr 2023-08-20 05:01:23 UTC
I also get random disconnects on kernel 6.3.0-7-generic with a Samsung T7 Shield external SSD drive. Unfortunately it is hard to reproduce this error, it usually takes hours before it occurs the first time.

System:
  Kernel: 6.3.0-7-generic arch: x86_64 bits: 64 compiler: N/A Console: pty pts/10 Distro: Ubuntu
    23.10 (Mantic Minotaur)
Machine:
  Type: Server System: Supermicro product: C9Z390-PGW v: 0123456789 serial: <filter>
  Mobo: Supermicro model: C9Z390-PGW v: 1.01A serial: <filter> UEFI: American Megatrends v: 1.3
    date: 06/03/2020
CPU:
  Info: 8-core model: Intel Core i9-9900K bits: 64 type: MT MCP arch: Coffee Lake rev: D cache:
    L1: 512 KiB L2: 2 MiB L3: 16 MiB
  Speed (MHz): avg: 3687 high: 5002 min/max: 800/5000 cores: 1: 5002 2: 3600 3: 3600 4: 3600
    5: 3600 6: 3600 7: 3600 8: 3600 9: 3600 10: 3600 11: 3600 12: 3600 13: 3600 14: 3600 15: 3600
    16: 3600 bogomips: 115200
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx

/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/10p, 10000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
    |__ Port 4: Dev 10, If 0, Class=Mass Storage, Driver=uas, 10000M
        ID 04e8:61fb Samsung Electronics Co., Ltd

BOOT_IMAGE=/boot/vmlinuz-6.3.0-7-generic root=UUID=2c8c7990-bb1d-47dc-a70c-0272867b1807 ro quiet splash intel_iommu=on iommu=pt pcie_aspm=off initcall_blacklist=sysfb_init rd.modules-load=vf
io-pci vfio_pci.ids=10de:1e07,10de:10f7,10de:1ad6,10de:1ad7,1462:3710 vt.handoff=7

[349280.239403] usb 2-4: USB disconnect, device number 9
[349280.239689] xhci_hcd 0000:00:14.0: WARN Set TR Deq Ptr cmd failed due to incorrect slot or ep state.
[349280.239695] usb 2-4: cmd cmplt err -108
[349280.239702] sd 9:0:0:0: [sdh] tag#13 uas_zap_pending 0 uas-tag 1 inflight: CMD
[349280.239705] sd 9:0:0:0: [sdh] tag#13 CDB: Write(16) 8a 00 00 00 00 00 d3 28 e4 00 00 00 00 d8 00 00
[349280.239724] sd 9:0:0:0: [sdh] tag#13 FAILED Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK cmd_age=0s
[349280.239726] sd 9:0:0:0: [sdh] tag#13 CDB: Write(16) 8a 00 00 00 00 00 d3 28 e4 00 00 00 00 d8 00 00
[349280.239728] I/O error, dev sdh, sector 3542672384 op 0x1:(WRITE) flags 0x8800 phys_seg 27 prio class 2
[349280.239741] device offline error, dev sdh, sector 3542674432 op 0x1:(WRITE) flags 0x8800 phys_seg 35 prio class 2
[349280.239747] device offline error, dev sdh, sector 3542672640 op 0x1:(WRITE) flags 0x8800 phys_seg 24 prio class 2
[349280.239750] device offline error, dev sdh, sector 3542677504 op 0x1:(WRITE) flags 0x8800 phys_seg 45 prio class 2
[349280.239753] device offline error, dev sdh, sector 3542680576 op 0x1:(WRITE) flags 0x8800 phys_seg 41 prio class 2
[349280.239788] device offline error, dev sdh, sector 3542663168 op 0x1:(WRITE) flags 0x8800 phys_seg 35 prio class 2
[349280.239793] device offline error, dev sdh, sector 3542663680 op 0x1:(WRITE) flags 0x8800 phys_seg 29 prio class 2
[349280.239799] device offline error, dev sdh, sector 3542663936 op 0x1:(WRITE) flags 0x8800 phys_seg 26 prio class 2
[349280.299534] sd 9:0:0:0: [sdh] Synchronizing SCSI cache
[349280.523475] sd 9:0:0:0: [sdh] Synchronize Cache(10) failed: Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[349280.799817] usb 2-4: new SuperSpeed Plus Gen 2x1 USB device number 10 using xhci_hcd
[349280.820511] usb 2-4: New USB device found, idVendor=04e8, idProduct=61fb, bcdDevice= 1.00
[349280.820516] usb 2-4: New USB device strings: Mfr=2, Product=3, SerialNumber=1
[349280.820517] usb 2-4: Product: PSSD T7 Shield
[349280.820518] usb 2-4: Manufacturer: Samsung

[349280.830738] scsi host6: uas
[349280.831878] scsi 6:0:0:0: Direct-Access Samsung PSSD T7 Shield 0 PQ: 0 ANSI: 6
[349280.833309] sd 6:0:0:0: Attached scsi generic sg3 type 0
[349280.833566] sd 6:0:0:0: [sdd] 7814037168 512-byte logical blocks: (4.00 TB/3.64 TiB)
[349280.833701] sd 6:0:0:0: [sdd] Write Protect is off
[349280.833702] sd 6:0:0:0: [sdd] Mode Sense: 43 00 00 00
[349280.833884] sd 6:0:0:0: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[349280.834061] sd 6:0:0:0: [sdd] Preferred minimum I/O size 512 bytes
[349280.834063] sd 6:0:0:0: [sdd] Optimal transfer size 33553920 bytes
[349280.868657] sdd: sdd1 sdd2 sdd3
[349280.868993] sd 6:0:0:0: [sdd] Attached SCSI disk