Fix problems on disconnected devices in 7.3
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 0 repliesNew
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | usb: xhci: Fix TD invalidation on disconnected endpointsdrivers/ | +6 | 0 replies | |
| 2/4 | usb: xhci: Give back stranded URBs on disconnected endpointsdrivers/ | +20 | 0 replies | |
| 3/4 | usb: xhci: Give back URBs on halted disconnected endpointsdrivers/ | +11 | 0 replies | |
| 4/4 | usb: xhci: Reject URBs to disconnected devicesdrivers/ | +7 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/4] Fix problems on disconnected devices in 7.3
Quoted 6 lines · Michal Pecio
Anyway, I think it all can be done with a bit less code, while also handling disconnection during unlink. Particularly on EP0, multiple URBs may be submitted by different drivers and/or userspace. Just because one of them unlinks its URB doesn't mean that the others are aware of anything being wrong and won't stall for <N> seconds.
Quoted 7 lines
This below is a rudimentarily tested RFC but it seems to work. It's simple enough that hopefully it might even be correct. I will test it more and write a changelog later today if there are no objections.
I tweaked the logic to return everything with
-ESHUTDOWNand not bother to assign proper status to the URB which halted. Intuition:
we want them to give up, not callclear_halt()orreset_device().
Actually, wouldn't this break the "resuscitation" feature? Does anyone depend on it? Hell knows... I changed to give back the halted URB with normal status and ended up with similar code as everyone else, but in different places, so that URBs should also be flushed on unlink now. Took a little longer than I hoped.
Is the last patch 4/4 necessary in practice? I guess it probably is.
As for disconnection of USB3 NICs from Renesas, that still works without hanging the HC. In fact, we could even Reset EP and Set Deq on the interrupt endpoint and nothing happens if it's not restarted, but these patches here only clean up EP0.
Regards,
Michal