Skip to content

Commit 3cc6206

Browse files
matnymangregkh
authored andcommitted
xhci: dbc: Flush queued requests before stopping dbc
commit efe3e3ae5a66cb38ef29c909e951b4039044bae9 upstream. Flush dbc requests when dbc is stopped and transfer rings are freed. Failure to flush them lead to leaking memory and dbc completing odd requests after resuming from suspend, leading to error messages such as: [ 95.344392] xhci_hcd 0000:00:0d.0: no matched request Cc: stable <[email protected]> Fixes: dfba217 ("usb: xhci: Add DbC support in xHCI driver") Signed-off-by: Mathias Nyman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent c3b5229 commit 3cc6206

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/usb/host/xhci-dbgcap.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -639,6 +639,10 @@ static void xhci_dbc_stop(struct xhci_dbc *dbc)
639639
case DS_DISABLED:
640640
return;
641641
case DS_CONFIGURED:
642+
spin_lock(&dbc->lock);
643+
xhci_dbc_flush_requests(dbc);
644+
spin_unlock(&dbc->lock);
645+
642646
if (dbc->driver->disconnect)
643647
dbc->driver->disconnect(dbc);
644648
break;

0 commit comments

Comments
 (0)