]> git.baikalelectronics.ru Git - kernel.git/commitdiff
xhci: Don't show warning for reinit on known broken suspend
authorMario Limonciello <mario.limonciello@amd.com>
Wed, 21 Sep 2022 12:34:47 +0000 (15:34 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Oct 2022 11:22:39 +0000 (13:22 +0200)
[ Upstream commit 504e141860a9aa06c2bdf7ce5687382a2eb5b059 ]

commit 9f26c0af5a48 ("xhci: re-initialize the HC during resume if HCE was
set") introduced a new warning message when the host controller error
was set and re-initializing.

This is expected behavior on some designs which already set
`xhci->broken_suspend` so the new warning is alarming to some users.

Modify the code to only show the warning if this was a surprising behavior
to the XHCI driver.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=216470
Fixes: 9f26c0af5a48 ("xhci: re-initialize the HC during resume if HCE was set")
Reported-by: Artem S. Tashkinov <aros@gmx.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20220921123450.671459-4-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/usb/host/xhci.c

index 5ce16a259e61223f0fbb8eaa47347f2da80ed7a1..3537113f006fa6817b382853d6aa31cb20b06f6c 100644 (file)
@@ -1163,7 +1163,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) {