Re: [PATCH] usb: xhci: Fix HCS_ERST_MAX conversion
From: Mathias Nyman
Date: Thu Aug 20 2026 - 08:34:39 EST
On 8/20/26 12:57, Chen-Yu Tsai wrote:
This partially reverts commit 6d45e9556d4a11b726e897d86e095b96db4550d8.
HCS_ERST_MAX holds power of 2 value for maximum number of segments.
In the culprit commit, this was incorrectly converted to "shift up 2".
On hardware where this field is zero, this results in xhci_alloc_erst()
calling dma_alloc_coherent() with size = 0, leading to a horrible splat
and non-usable XHCI.
Revert the shift-up-2 to the BIT() macro.
Fixes: 6d45e9556d4a ("usb: xhci: standardize multi bit-field macros")
Cc: Niklas Neronin <niklas.neronin@xxxxxxxxxxxxxxx>
Signed-off-by: Chen-Yu Tsai <wenst@xxxxxxxxxxxx>
---
Thanks
Adding to queue, will submit after rc1
-Mathias