USB fixes: (Re)implement timeouts
Get series with b4
b4 am [email protected] change-id 20231029-usb-fixes-5-ca87bbedb40cVersions newest first
- v1 Latest2 patches 5 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | usb: Pass through timeout to driverscommon/ drivers/ drivers/ +5 more | +29 | 2 replies | |
| 2/2 | usb: xhci: Hook up timeoutsdrivers/ drivers/ include/ | +43 | 1 reply |
Reviews trailers per patch
All 2 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.
| Patch | Neal Gompa | Marek Vasut |
|---|---|---|
| Series | R-b | |
| 1/2 | R-b | |
| 2/2 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/2] USB fixes: (Re)implement timeouts
A long time ago, the USB code was interrupt-driven and used top-level timeout handling. This has long been obsolete, and that code is just broken dead cruft. HC drivers instead hardcode timeouts today.
We need to be able to specify timeouts explicitly to handle cases like USB hard disks spinning up, without having ridiculously long timeouts across the board (which would cause endless waiting when things go wrong anywhere else). So, it's time to rip out the old broken nonsense and actually pass through timeouts to USB host controller drivers, so they can be implemented properly.
This series adds the necessary top-level scaffolding for control/bulk timeouts, and implements them in xHCI. I didn't bother with interrupt transfers, since I figure those probably never need long timeouts anyway.
The platform I deal with only has xHCI, so I'll leave implementing this for EHCI/OHCI to someone else if anyone cares :)
This series needs to be applied after [1], since the xHCI changes depend on changes made there.
[1] https://lore.kernel.org/u-boot/[email protected]/
---
Hector Martin (2):
usb: Pass through timeout to drivers
usb: xhci: Hook up timeouts
common/usb.c | 21 ++------------------- drivers/usb/host/ehci-hcd.c | 5 +++-- drivers/usb/host/ohci-hcd.c | 5 +++-- drivers/usb/host/r8a66597-hcd.c | 5 +++-- drivers/usb/host/usb-sandbox.c | 6 ++++-- drivers/usb/host/usb-uclass.c | 9 +++++---- drivers/usb/host/xhci-ring.c | 32 ++++++++++++++++++++------------ drivers/usb/host/xhci.c | 28 ++++++++++++++++------------ include/usb.h | 10 ++++++---- include/usb/xhci.h | 14 ++++++++++---- 10 files changed, 72 insertions(+), 63 deletions(-)
---
base-commit: 3d5d748e4d66b98109669c05d0c473fe67795801
change-id: 20231029-usb-fixes-5-ca87bbedb40c
Best regards,
Signature · 1 line
Hector Martin <[email protected]>