From: Michal Pecio <michal.pecio@gmail.com>
To: Mathias Nyman <mathias.nyman@intel.com>
Cc: linux-usb@vger.kernel.org
Subject: [PATCH 2/2] usb: xhci: Warn about suspected "start-stop" bugs in HCs
Date: Mon, 14 Oct 2024 21:11:22 +0200 [thread overview]
Message-ID: <20241014211122.7cb5b133@foxbook> (raw)
In-Reply-To: <20241014210840.5941d336@foxbook>
NEC controllers have a bug, where stopping an endpoint soon after it
has been restarted doesn't quite work as expected. This forces us to
track whether each Stop Endpoint command is expected to fail or not.
Reuse this infrastracture to warn about similar bugs on other chips,
if any are found.
Signed-off-by: Michal Pecio <michal.pecio@gmail.com>
---
drivers/usb/host/xhci-ring.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index c0efb4d34ab9..c326b86d713c 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -1186,8 +1186,11 @@ static void xhci_handle_cmd_stop_ep(struct xhci_hcd *xhci, int slot_id,
* So keep retrying until the command clearly succeeds.
* Not clear what to do if other HCs have similar bugs.
*/
- if (!(xhci->quirks & XHCI_NEC_HOST))
+ if (!(xhci->quirks & XHCI_NEC_HOST)) {
+ xhci_warn(xhci, "Unhandled Stop Endpoint failure on slot %d ep_index %d\n",
+ slot_id, ep_index);
break;
+ }
fallthrough;
case EP_STATE_RUNNING:
--
2.43.0
next prev parent reply other threads:[~2024-10-14 19:11 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-14 19:08 [PATCH 0/2] Fix the NEC stop bug workaround Michal Pecio
2024-10-14 19:10 ` [PATCH 1/2] usb: xhci: " Michal Pecio
2024-10-15 10:38 ` Greg KH
2024-10-15 11:05 ` Mathias Nyman
2024-10-15 13:27 ` Michał Pecio
2024-10-14 19:11 ` Michal Pecio [this message]
2024-10-15 10:40 ` [PATCH 2/2] usb: xhci: Warn about suspected "start-stop" bugs in HCs Greg KH
2024-10-15 18:52 ` Michał Pecio
2024-10-15 12:23 ` [PATCH 0/2] Fix the NEC stop bug workaround Mathias Nyman
2024-10-15 14:51 ` Alan Stern
2024-10-16 5:47 ` Michał Pecio
2024-10-24 15:29 ` Mathias Nyman
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=20241014211122.7cb5b133@foxbook \
--to=michal.pecio@gmail.com \
--cc=linux-usb@vger.kernel.org \
--cc=mathias.nyman@intel.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