]> git.itanic.dy.fi Git - linux-stable/commit
xhci: Adjust segment numbers after ring expansion
authorLukas Wunner <lukas@wunner.de>
Thu, 19 Oct 2023 10:29:11 +0000 (13:29 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 21 Oct 2023 10:38:53 +0000 (12:38 +0200)
commit35899f58fe13d385b1dbc33004e5a31bf2c18b7a
treebd7139e629470c8eed125239265ba0a76ce13e75
parent28084d3fcc3c8445542917f32e382c45b5343cc2
xhci: Adjust segment numbers after ring expansion

Initial xhci_ring allocation has just been amended to assign a
monotonically increasing number to each ring segment.

However rings may be expanded after initial allocation.

So number newly inserted segments starting from the preceding segment in
the ring and renumber all segments succeeding the newly inserted ones.

This is not a fix because ring expansion currently isn't done on the
Event Ring and that's the only ring type using the segment number.
It's just in preparation for when either Event Ring expansion is added
or when other ring types start making use of the segment number.

Signed-off-by: Lukas Wunner <lukas@wunner.de>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Link: https://lore.kernel.org/r/20231019102924.2797346-7-mathias.nyman@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-mem.c