Skip to content

Commit efe3e3a

Browse files
matnymangregkh
authored andcommitted
xhci: dbc: Flush queued requests before stopping dbc
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 2b857d6 commit efe3e3a

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
@@ -652,6 +652,10 @@ static void xhci_dbc_stop(struct xhci_dbc *dbc)
652652
case DS_DISABLED:
653653
return;
654654
case DS_CONFIGURED:
655+
spin_lock(&dbc->lock);
656+
xhci_dbc_flush_requests(dbc);
657+
spin_unlock(&dbc->lock);
658+
655659
if (dbc->driver->disconnect)
656660
dbc->driver->disconnect(dbc);
657661
break;

0 commit comments

Comments
 (0)