linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xhci: Don't show warning for reinit on known broken suspend
@ 2022-09-13 20:35 Mario Limonciello
  2022-09-14 12:28 ` Mathias Nyman
  0 siblings, 1 reply; 2+ messages in thread
From: Mario Limonciello @ 2022-09-13 20:35 UTC (permalink / raw)
  To: mario.limonciello, Mathias Nyman, Greg Kroah-Hartman, Puma Hsu
  Cc: Artem S . Tashkinov, linux-usb, linux-kernel

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")
Link: https://bugzilla.kernel.org/show_bug.cgi?id=216470
Reported-by: Artem S. Tashkinov <aros@gmx.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
 drivers/usb/host/xhci.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 38649284ff88..a7ef675f00fd 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -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) {
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] xhci: Don't show warning for reinit on known broken suspend
  2022-09-13 20:35 [PATCH] xhci: Don't show warning for reinit on known broken suspend Mario Limonciello
@ 2022-09-14 12:28 ` Mathias Nyman
  0 siblings, 0 replies; 2+ messages in thread
From: Mathias Nyman @ 2022-09-14 12:28 UTC (permalink / raw)
  To: Mario Limonciello, Mathias Nyman, Greg Kroah-Hartman, Puma Hsu
  Cc: Artem S . Tashkinov, linux-usb, linux-kernel

On 13.9.2022 23.35, Mario Limonciello wrote:
> 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")
> Link: https://bugzilla.kernel.org/show_bug.cgi?id=216470
> Reported-by: Artem S. Tashkinov <aros@gmx.com>
> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> ---

Thanks, adding to queue

-Mathias

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-14 12:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-13 20:35 [PATCH] xhci: Don't show warning for reinit on known broken suspend Mario Limonciello
2022-09-14 12:28 ` Mathias Nyman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).