Skip to contentSkip to conversation

xhci: Don't show warning for reinit on known broken suspend

PATCH In review Mario Limonciello 2 participants 2 messages Sep 13, 2022 – Sep 14, 2022

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

PATCH 1/1 xhci: Don't show warning for reinit on known broken suspend

commit 8b328f8002bc ("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.

Fixes 8b328f8002bc ("xhci: re-initialize the HC during resume if HCE was set")
---
 drivers/usb/host/xhci.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
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);
 	}
 
 	if (reinit_xhc) {
Signature · 1 line
2.34.1
#1 lore raw
Quoted 7 lines · Mario Limonciello

commit 8b328f8002bc ("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.

Quoted 8 lines

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

Fixes 8b328f8002bc ("xhci: re-initialize the HC during resume if HCE was set")

---

Thanks, adding to queue

-Mathias