[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250423092917.1031-1-tanghuan@vivo.com>
Date: Wed, 23 Apr 2025 17:29:17 +0800
From: Huan Tang <tanghuan@...o.com>
To: alim.akhtar@...sung.com,
avri.altman@....com,
bvanassche@....org,
James.Bottomley@...senPartnership.com,
martin.petersen@...cle.com,
matthias.bgg@...il.com,
angelogioacchino.delregno@...labora.com,
peter.wang@...iatek.com,
manivannan.sadhasivam@...aro.org,
quic_nguyenb@...cinc.com,
luhongfei@...o.com,
tanghuan@...o.com,
linux-scsi@...r.kernel.org,
linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org
Cc: opensource.kernel@...o.com
Subject: [PATCH] ufs: core: fix WB resize use wrong offset
'Commit 500d4b742e0c ("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 read the value of "DEVICE_DESC_PARAM_EXT_WB_SUP"
to determine whether the device supports WB resize.
Fixes: 500d4b742e0c ("scsi: ufs: core: Add WB buffer resize support")
Reported-by: Peter Wang <peter.wang@...iatek.com>
Closes: https://lore.kernel.org/all/7ce05b28f5d4b4b4973244310010c1487
bdf4124.camel@...iatek.com/
Signed-off-by: Huan Tang <tanghuan@...o.com>
---
drivers/ufs/core/ufshcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
index dc55c94fa45e..1c53ccf5a616 100644
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -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];
--
2.39.0
Powered by blists - more mailing lists