Skip to content

Commit 8bfd11d

Browse files
matnymangregkh
authored andcommitted
xhci: dbc: Flush queued requests before stopping dbc
commit efe3e3a 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 <stable@kernel.org> Fixes: dfba217 ("usb: xhci: Add DbC support in xHCI driver") Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Link: https://lore.kernel.org/r/20250627144127.3889714-5-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 9f3b2e4 commit 8bfd11d

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

0 commit comments

Comments
 (0)