mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Peter Wang (王信友)" <peter.wang@mediatek.com>
To: "avri.altman@wdc.com" <avri.altman@wdc.com>,
	"linux-mediatek@lists.infradead.org"
	<linux-mediatek@lists.infradead.org>,
	"tanghuan@vivo.com" <tanghuan@vivo.com>,
	"quic_nguyenb@quicinc.com" <quic_nguyenb@quicinc.com>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	"bvanassche@acm.org" <bvanassche@acm.org>,
	"manivannan.sadhasivam@linaro.org"
	<manivannan.sadhasivam@linaro.org>,
	"alim.akhtar@samsung.com" <alim.akhtar@samsung.com>,
	"luhongfei@vivo.com" <luhongfei@vivo.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
	"James.Bottomley@HansenPartnership.com"
	<James.Bottomley@HansenPartnership.com>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>
Cc: "opensource.kernel@vivo.com" <opensource.kernel@vivo.com>
Subject: Re: [PATCH] ufs: core: fix WB resize use wrong offset
Date: Wed, 23 Apr 2025 09:46:04 +0000	[thread overview]
Message-ID: <cba286b68390472e2f3413b58c1f223b38f0294a.camel@mediatek.com> (raw)
In-Reply-To: <20250423092917.1031-1-tanghuan@vivo.com>

On Wed, 2025-04-23 at 17:29 +0800, Huan Tang wrote:
> '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@mediatek.com>
> Closes: https://lore.kernel.org/all/7ce05b28f5d4b4b4973244310010c1487
> bdf4124.camel@mediatek.com/
> Signed-off-by: Huan Tang <tanghuan@vivo.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
> 


Reviewed-by: Peter Wang <peter.wang@mediatek.com>



  reply	other threads:[~2025-04-23  9:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-23  9:29 Huan Tang
2025-04-23  9:46 ` Peter Wang (王信友) [this message]
2025-04-29  1:19 ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cba286b68390472e2f3413b58c1f223b38f0294a.camel@mediatek.com \
    --to=peter.wang@mediatek.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=alim.akhtar@samsung.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=avri.altman@wdc.com \
    --cc=bvanassche@acm.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=luhongfei@vivo.com \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=martin.petersen@oracle.com \
    --cc=matthias.bgg@gmail.com \
    --cc=opensource.kernel@vivo.com \
    --cc=quic_nguyenb@quicinc.com \
    --cc=tanghuan@vivo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®