Commit 89bb3dc
usb: Flush altsetting 0 endpoints before reinitializating them after reset.
usb core avoids sending a Set-Interface altsetting 0 request after device
reset, and instead relies on calling usb_disable_interface() and
usb_enable_interface() to flush and reset host-side of those endpoints.
xHCI hosts allocate and set up endpoint ring buffers and host_ep->hcpriv
during usb_hcd_alloc_bandwidth() callback, which in this case is called
before flushing the endpoint in usb_disable_interface().
Call usb_disable_interface() before usb_hcd_alloc_bandwidth() to ensure
URBs are flushed before new ring buffers for the endpoints are allocated.
Otherwise host driver will attempt to find and remove old stale URBs
from a freshly allocated new ringbuffer.
Cc: stable <stable@kernel.org>
Fixes: 4fe0387 ("USB: don't send Set-Interface after reset")
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20250514132520.225345-1-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent e33ebb1 commit 89bb3dc
1 file changed
Lines changed: 14 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6137 | 6137 | | |
6138 | 6138 | | |
6139 | 6139 | | |
| 6140 | + | |
6140 | 6141 | | |
6141 | 6142 | | |
6142 | 6143 | | |
| |||
6194 | 6195 | | |
6195 | 6196 | | |
6196 | 6197 | | |
| 6198 | + | |
| 6199 | + | |
| 6200 | + | |
| 6201 | + | |
| 6202 | + | |
| 6203 | + | |
| 6204 | + | |
| 6205 | + | |
| 6206 | + | |
| 6207 | + | |
| 6208 | + | |
| 6209 | + | |
6197 | 6210 | | |
6198 | 6211 | | |
6199 | 6212 | | |
| |||
6225 | 6238 | | |
6226 | 6239 | | |
6227 | 6240 | | |
6228 | | - | |
6229 | 6241 | | |
6230 | 6242 | | |
| 6243 | + | |
6231 | 6244 | | |
6232 | 6245 | | |
6233 | | - | |
6234 | 6246 | | |
6235 | 6247 | | |
6236 | 6248 | | |
| |||
0 commit comments