From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: <gregkh@linuxfoundation.org>
Cc: <linux-usb@vger.kernel.org>,
Mario Limonciello <mario.limonciello@amd.com>,
"Artem S . Tashkinov" <aros@gmx.com>,
Mathias Nyman <mathias.nyman@linux.intel.com>
Subject: [PATCH 3/6] xhci: Don't show warning for reinit on known broken suspend
Date: Wed, 21 Sep 2022 15:34:47 +0300 [thread overview]
Message-ID: <20220921123450.671459-4-mathias.nyman@linux.intel.com> (raw)
In-Reply-To: <20220921123450.671459-1-mathias.nyman@linux.intel.com>
From: Mario Limonciello <mario.limonciello@amd.com>
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>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.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.25.1
next prev parent reply other threads:[~2022-09-21 12:33 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-21 12:34 [PATCH 0/6] xhci features and fixes for usb-next Mathias Nyman
2022-09-21 12:34 ` [PATCH 1/6] usb: host: xhci: Fix potential memory leak in xhci_alloc_stream_info() Mathias Nyman
2022-09-21 12:34 ` [PATCH 2/6] xhci: dbc: Fix memory leak in xhci_alloc_dbc() Mathias Nyman
2022-09-21 12:34 ` Mathias Nyman [this message]
2022-09-21 12:34 ` [PATCH 4/6] xhci: show fault reason for a failed enable slot command Mathias Nyman
2022-09-21 12:34 ` [PATCH 5/6] xhci: remove unused command member from struct xhci_hcd struct Mathias Nyman
2022-09-21 12:34 ` [PATCH 6/6] xhci: remove unused lpm_failed_dev member from struct xhci_hcd Mathias Nyman
2022-09-22 12:08 ` [PATCH 0/6] xhci features and fixes for usb-next Greg KH
2022-09-22 12:43 ` Mathias Nyman
2022-09-22 12:52 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220921123450.671459-4-mathias.nyman@linux.intel.com \
--to=mathias.nyman@linux.intel.com \
--cc=aros@gmx.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-usb@vger.kernel.org \
--cc=mario.limonciello@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox