linux/drivers/ufs/core
wangshuaiwei 2f38fd99c0 scsi: ufs: core: Fix shift out of bounds when MAXQ=32
According to JESD223F, the maximum number of queues (MAXQ) is 32. When MCQ
is enabled and ESI is disabled, nr_hw_queues=32 causes a shift overflow
problem.

Fix this by using 64-bit intermediate values to handle the nr_hw_queues=32
case safely.

Signed-off-by: wangshuaiwei <wangshuaiwei1@xiaomi.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Link: https://patch.msgid.link/20260224063228.50112-1-wangshuaiwei1@xiaomi.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
2026-02-24 14:23:07 -05:00
..
Kconfig
Makefile
ufs-debugfs.c
ufs-debugfs.h
ufs-fault-injection.c
ufs-fault-injection.h
ufs-hwmon.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
ufs-mcq.c
ufs-rpmb.c
ufs-sysfs.c
ufs-sysfs.h
ufs_bsg.c
ufs_bsg.h
ufs_trace.h
ufs_trace_types.h
ufshcd-crypto.c
ufshcd-crypto.h
ufshcd-priv.h
ufshcd.c scsi: ufs: core: Fix shift out of bounds when MAXQ=32 2026-02-24 14:23:07 -05:00