Commit efe3e3ae authored by Mathias Nyman's avatar Mathias Nyman Committed by Greg Kroah-Hartman
Browse files

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 <stable@kernel.org>
Fixes: dfba2174 ("usb: xhci: Add DbC support in xHCI driver")
Signed-off-by: default avatarMathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20250627144127.3889714-5-mathias.nyman@linux.intel.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2b857d69
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -652,6 +652,10 @@ static void xhci_dbc_stop(struct xhci_dbc *dbc)
	case DS_DISABLED:
		return;
	case DS_CONFIGURED:
		spin_lock(&dbc->lock);
		xhci_dbc_flush_requests(dbc);
		spin_unlock(&dbc->lock);

		if (dbc->driver->disconnect)
			dbc->driver->disconnect(dbc);
		break;