mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-01 18:22:16 -05:00
scsi: ufs: core: Fix WB resize using wrong offset
Commit500d4b742e("scsi: ufs: core: Add WB buffer resize support") incorrectly reads the value of offset DEVICE_DESC_PARAM_EXT_UFS_FEATURE_SUP to determine whether WB resize is supported. Fix the issue by reading the value of DEVICE_DESC_PARAM_EXT_WB_SUP to determine whether the device supports WB resize. Fixes:500d4b742e("scsi: ufs: core: Add WB buffer resize support") Reported-by: Peter Wang <peter.wang@mediatek.com> Closes: https://lore.kernel.org/all/7ce05b28f5d4b4b4973244310010c1487 Signed-off-by: Huan Tang <tanghuan@vivo.com> Link: https://lore.kernel.org/r/20250423092917.1031-1-tanghuan@vivo.com Reviewed-by: Peter Wang <peter.wang@mediatek.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
committed by
Martin K. Petersen
parent
3c400df513
commit
a84a12d34f
@@ -8143,7 +8143,7 @@ static void ufshcd_wb_probe(struct ufs_hba *hba, const u8 *desc_buf)
|
||||
dev_info->wb_buffer_type = desc_buf[DEVICE_DESC_PARAM_WB_TYPE];
|
||||
|
||||
dev_info->ext_wb_sup = get_unaligned_be16(desc_buf +
|
||||
DEVICE_DESC_PARAM_EXT_UFS_FEATURE_SUP);
|
||||
DEVICE_DESC_PARAM_EXT_WB_SUP);
|
||||
|
||||
dev_info->b_presrv_uspc_en =
|
||||
desc_buf[DEVICE_DESC_PARAM_WB_PRESRV_USRSPC_EN];
|
||||
|
||||
Reference in New Issue
Block a user