Skip to contentSkip to conversation

New: [Regression] xhci_hcd 0000:08:00.2: xHC error in resume, USBSTS 0x401, Reinit

Bug 216470 [email protected] 1 participant 6 messages Sep 10, 2022 – Sep 14, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

https://bugzilla.kernel.org/show_bug.cgi?id=216470

            Bug ID: 216470
           Summary: [Regression] xhci_hcd 0000:08:00.2: xHC error in
                    resume, USBSTS 0x401, Reinit
           Product: Drivers
           Version: 2.5
    Kernel Version: 5.19.8
          Hardware: AMD
                OS: Linux
              Tree: Mainline
            Status: NEW
          Severity: low
          Priority: P1
         Component: USB
          Assignee: [email protected]
          Reporter: [email protected]
        Regression: No

I don't remember this error in kernel 5.18 or earlier kernels, so I consider this a regression. Maybe my memory is wrong.

This error/warning message is logged after suspend/resume.

I only have USB keyboard, mouse and onboard/built-in BT adapter connected but all of them are connected to USB2 ports and this driver AFAIK is responsible for USB3.

$ lspci

00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Root Complex
00:00.2 IOMMU: Advanced Micro Devices, Inc. [AMD] Starship/Matisse IOMMU 00:01.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge
00:01.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse GPP Bridge
00:02.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge
00:03.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge
00:03.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse GPP Bridge
00:04.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge
00:05.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge
00:07.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge
00:07.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Internal PCIe GPP Bridge 0 to bus[E:B]
00:08.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Host Bridge
00:08.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Internal PCIe GPP Bridge 0 to bus[E:B]
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] Matisse/Vermeer Data
Fabric: Device 18h; Function 0
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Matisse/Vermeer Data
Fabric: Device 18h; Function 1
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Matisse/Vermeer Data
Fabric: Device 18h; Function 2
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Matisse/Vermeer Data
Fabric: Device 18h; Function 3
00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Matisse/Vermeer Data
Fabric: Device 18h; Function 4
00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Matisse/Vermeer Data
Fabric: Device 18h; Function 5
00:18.6 Host bridge: Advanced Micro Devices, Inc. [AMD] Matisse/Vermeer Data
Fabric: Device 18h; Function 6
00:18.7 Host bridge: Advanced Micro Devices, Inc. [AMD] Matisse/Vermeer Data
Fabric: Device 18h; Function 7
01:00.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Matisse Switch Upstream 02:01.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Matisse PCIe GPP Bridge 02:05.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Matisse PCIe GPP Bridge 02:08.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Matisse PCIe GPP Bridge 02:09.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Matisse PCIe GPP Bridge 02:0a.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Matisse PCIe GPP Bridge 03:00.0 Non-Volatile memory controller: Sandisk Corp Device 501e 04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 26)
05:00.0 Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Reserved SPP
05:00.1 USB controller: Advanced Micro Devices, Inc. [AMD] Matisse USB 3.0 Host Controller
05:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Matisse USB 3.0 Host Controller
06:00.0 SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] (rev 51)
07:00.0 SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] (rev 51)
08:00.0 VGA compatible controller: NVIDIA Corporation TU116 [GeForce GTX 1660 Ti] (rev a1)
08:00.1 Audio device: NVIDIA Corporation TU116 High Definition Audio Controller (rev a1)
08:00.2 USB controller: NVIDIA Corporation TU116 USB 3.1 Host Controller (rev a1)
08:00.3 Serial bus controller: NVIDIA Corporation TU116 USB Type-C UCSI Controller (rev a1)
09:00.0 Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse PCIe Dummy Function
0a:00.0 Non-Essential Instrumentation [1300]: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Reserved SPP
0a:00.1 Encryption controller: Advanced Micro Devices, Inc. [AMD] Starship/Matisse Cryptographic Coprocessor PSPCPP
0a:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Matisse USB 3.0 Host Controller
0a:00.4 Audio device: Advanced Micro Devices, Inc. [AMD] Starship/Matisse HD Audio Controller

$ lsusb -vt
/:  Bus 08.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 10000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
        ID 2109:0813 VIA Labs, Inc. VL813 Hub
/:  Bus 07.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
        ID 2109:2813 VIA Labs, Inc. VL813 Hub
    |__ Port 3: Dev 3, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
        ID 046d:c31d Logitech, Inc. Media Keyboard K200
    |__ Port 3: Dev 3, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
        ID 046d:c31d Logitech, Inc. Media Keyboard K200
    |__ Port 4: Dev 4, If 0, Class=Human Interface Device, Driver=usbhid, 12M
        ID 046d:c084 Logitech, Inc. G203 Gaming Mouse
    |__ Port 4: Dev 4, If 1, Class=Human Interface Device, Driver=usbhid, 12M
        ID 046d:c084 Logitech, Inc. G203 Gaming Mouse
/:  Bus 06.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 10000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
/:  Bus 05.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/2p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
/:  Bus 04.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 10000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
    |__ Port 5: Dev 2, If 0, Class=Wireless, Driver=btusb, 12M
        ID 8087:0025 Intel Corp. Wireless-AC 9260 Bluetooth Adapter
    |__ Port 5: Dev 2, If 1, Class=Wireless, Driver=btusb, 12M
        ID 8087:0025 Intel Corp. Wireless-AC 9260 Bluetooth Adapter
    |__ Port 6: Dev 3, If 0, Class=Vendor Specific Class, Driver=, 12M
        ID 0b05:18f3 ASUSTek Computer, Inc. 
    |__ Port 6: Dev 3, If 2, Class=Human Interface Device, Driver=usbhid, 12M
        ID 0b05:18f3 ASUSTek Computer, Inc. 
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/4p, 10000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci_hcd/6p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#1 lore raw

[Bug 216470] [Regression] xhci_hcd 0000:08:00.2: xHC error in resume, USBSTS 0x401, Reinit

https://bugzilla.kernel.org/show_bug.cgi?id=216470

Artem S. Tashkinov ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------

                 CC|                            |[email protected]
                   |                            |om

--- Comment #1 from Artem S. Tashkinov ([email protected]) --- CC'ing Mathias Nyman.

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#2 lore raw

[Bug 216470] [Regression] xhci_hcd 0000:08:00.2: xHC error in resume, USBSTS 0x401, Reinit

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=216470

Artem S. Tashkinov ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------
Regression|No |Yes

--- Comment #2 from Artem S. Tashkinov ([email protected]) --- Google says the error is relatively new:

https://www.google.com/search?q=%22xHC+error+in+resume%2C+USBSTS+0x401%22

Looks like this is indeed a regression because there are no results other than those starting at approximately April, 2022.

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#3 lore raw

[Bug 216470] [Regression] xhci_hcd 0000:08:00.2: xHC error in resume, USBSTS 0x401, Reinit

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=216470

Mario Limonciello (AMD) ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |ASSIGNED
                 CC|                            |[email protected]

--- Comment #3 from Mario Limonciello (AMD) ([email protected]) --- It's a new message as of 5.17-rc6 or later.

https://github.com/torvalds/linux/commit/8b328f8002bcf29ef517ee4bf234e09aabec4d2e

The behavior however is not new; it's due to this quirk introduced a few years back for your model.

https://github.com/torvalds/linux/commit/a7d57abcc8a5bdeb53bbf8e87558e8e0a2c2a29d

I don't think we should be doing anything functionally here. The only think that might make sense IMO is downgrading the message to INFO or not showing it instead of WARN when xhci->broken_suspend is set.

Something like this:

drivers/usb/host/xhci.c +0 -1
index 38649284ff88..a7ef675f00fd 100644
@@ -1183,7 +1183,8 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
        /* re-initialize the HC on Restore Error, or Host Controller Error */
        if (temp & (STS_SRE | STS_HCE)) {
                reinit_xhc = true;
-               xhci_warn(xhci, "xHC error in resume, USBSTS 0x%x, Reinit\n",

temp);
+ if (!xhci->broken_suspend)
+ xhci_warn(xhci, "xHC error in resume, USBSTS 0x%x,

Reinit\n", temp);
        }

        if (reinit_xhc) {
Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#4 lore raw

[Bug 216470] [Regression] xhci_hcd 0000:08:00.2: xHC error in resume, USBSTS 0x401, Reinit

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=216470

--- Comment #4 from Artem S. Tashkinov ([email protected]) --- (In reply to Mario Limonciello (AMD) from comment #3)

Quoted 32 lines

It's a new message as of 5.17-rc6 or later.

https://github.com/torvalds/linux/commit/
8b328f8002bcf29ef517ee4bf234e09aabec4d2e

The behavior however is not new; it's due to this quirk introduced a few years back for your model.

https://github.com/torvalds/linux/commit/
a7d57abcc8a5bdeb53bbf8e87558e8e0a2c2a29d

I don't think we should be doing anything functionally here. The only think that might make sense IMO is downgrading the message to INFO or not showing it instead of WARN when xhci->broken_suspend is set.

Something like this:

drivers/usb/host/xhci.c +2 -1
index 38649284ff88..a7ef675f00fd 100644
@@ -1183,7 +1183,8 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
        /* re-initialize the HC on Restore Error, or Host Controller Error */
        if (temp & (STS_SRE | STS_HCE)) {
                reinit_xhc = true;
-               xhci_warn(xhci, "xHC error in resume, USBSTS 0x%x,
 Reinit\n", temp);
+               if (!xhci->broken_suspend)
+                       xhci_warn(xhci, "xHC error in resume, USBSTS 0x%x,
 Reinit\n", temp);
        }
Quoted 1 line
        if (reinit_xhc) {

Both options look good to me; would be great _not_ to get this warning at dmesg -t --level=alert,crit,err,warn.

Thanks a lot!

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.
#5 lore raw

[Bug 216470] [Regression] xhci_hcd 0000:08:00.2: xHC error in resume, USBSTS 0x401, Reinit

In reply to [email protected]

https://bugzilla.kernel.org/show_bug.cgi?id=216470

Mario Limonciello (AMD) ([email protected]) changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |CODE_FIX

--- Comment #5 from Mario Limonciello (AMD) ([email protected]) --- Here is the fix queued up.
https://lore.kernel.org/linux-usb/[email protected]/T/#t

Signature · 4 lines
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.