Skip to content

RFC fix xhci endpoint restart at EPROTO

Mathias Nyman linux-usb 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest2 patches 42 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2xhci: prevent automatic endpoint restart after stall or errordrivers/usb/host/xhci-ring.c drivers/usb/host/xhci.c drivers/usb/host/xhci.h+51 -842 replies
2/2xhci: Ensure URB is given back when endpoint halts on a multi-TD URBdrivers/usb/host/xhci-ring.c+6 -40 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC PATCH 0/2] fix xhci endpoint restart at EPROTO

Hi

These patches are related to the 'correctly handling EPROTO' discussion, and aim to fix the xhci endpoint automatic restart issue.

It also makes sure that multi TD URBs are given back with proper EPROTO/EPIPE status if a stall/transaction error is triggered on any TD of the URB, not just the last one.

endpoints will still be restarted when a new URB is queued, this does not fix the issue with BH URBs completion, but will print a debug message if a new URB is queued before previous 'tainted' pending URBs are cancelled.

I haven't been able to test the actual codepaths in these patches yet. Can't easily queue several URBs and somehow trigger stall or transaction error on early URBs, but would like to get feeback on this solution early.

Thanks
Mathias

Mathias Nyman (2):
xhci: prevent automatic endpoint restart after stall or error
xhci: Ensure URB is given back when endpoint halts on a multi-TD URB

 drivers/usb/host/xhci-ring.c | 50 +++++++++++++++++++++++++++++++-----
 drivers/usb/host/xhci.c      |  7 +++++
 drivers/usb/host/xhci.h      |  4 ++-
 3 files changed, 53 insertions(+), 8 deletions(-)
Signature · 1 line
2.43.0