xhci: dbc: decouple endpoint allocation from initialization
authorMathias Nyman <mathias.nyman@linux.intel.com>
Tue, 2 Sep 2025 10:53:04 +0000 (13:53 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 6 Sep 2025 13:29:18 +0000 (15:29 +0200)
commit220a0ffde02f962c13bc752b01aa570b8c65a37b
treed27b7bbcddde21c15e8d463197ff2630c57f5ccd
parent1b237f190eb3d36f52dffe07a40b5eb210280e00
xhci: dbc: decouple endpoint allocation from initialization

Decouple allocation of endpoint ring buffer from initialization
of the buffer, and initialization of endpoint context parts from
from the rest of the contexts.

It allows driver to clear up and reinitialize endpoint rings
after disconnect without reallocating everything.

This is a prerequisite for the next patch that prevents the transfer
ring from filling up with cancelled (no-op) TRBs if a debug cable is
reconnected several times without transferring anything.

Cc: stable@vger.kernel.org
Fixes: dfba2174dc42 ("usb: xhci: Add DbC support in xHCI driver")
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20250902105306.877476-2-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-dbgcap.c