* Re: [PATCH] scsi: ufs: Fix wrong value printed in unexpected UPIU response case
2026-05-27 9:21 ` [PATCH] scsi: ufs: Fix wrong value printed in unexpected UPIU response case Chanwoo Lee
@ 2026-05-27 16:08 ` Bart Van Assche
2026-06-02 1:59 ` Martin K. Petersen
2026-06-09 1:38 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Bart Van Assche @ 2026-05-27 16:08 UTC (permalink / raw)
To: Chanwoo Lee, alim.akhtar, avri.altman, James.Bottomley,
martin.petersen, peter.wang, beanhuo, can.guo, adrian.hunter,
linux-scsi, linux-kernel
On 5/27/26 2:21 AM, Chanwoo Lee wrote:
> In ufshcd_transfer_rsp_status(), the default case of the inner switch
> statement prints the UPIU response code when an unexpected response is
> received. However, the code was printing 'result' variable which is
> always 0 at that point, making the error message useless for debugging.
>
> Fix this by printing the actual UPIU response code returned by
> ufshcd_get_req_rsp().
>
> Fixes: 08108d31129a ("scsi: ufs: Improve type safety")
> Signed-off-by: Chanwoo Lee <cw9316.lee@samsung.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 0371dea44887..d8f309db967e 100644
> --- a/drivers/ufs/core/ufshcd.c
> +++ b/drivers/ufs/core/ufshcd.c
> @@ -5706,7 +5706,7 @@ static inline int ufshcd_transfer_rsp_status(struct ufs_hba *hba,
> default:
> dev_err(hba->dev,
> "Unexpected request response code = %x\n",
> - result);
> + ufshcd_get_req_rsp(lrbp->ucd_rsp_ptr));
> result = DID_ERROR << 16;
> break;
> }
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] scsi: ufs: Fix wrong value printed in unexpected UPIU response case
2026-05-27 9:21 ` [PATCH] scsi: ufs: Fix wrong value printed in unexpected UPIU response case Chanwoo Lee
2026-05-27 16:08 ` Bart Van Assche
@ 2026-06-02 1:59 ` Martin K. Petersen
2026-06-09 1:38 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2026-06-02 1:59 UTC (permalink / raw)
To: Chanwoo Lee
Cc: alim.akhtar, avri.altman, bvanassche, James.Bottomley,
martin.petersen, peter.wang, beanhuo, can.guo, adrian.hunter,
linux-scsi, linux-kernel
Chanwoo,
> In ufshcd_transfer_rsp_status(), the default case of the inner switch
> statement prints the UPIU response code when an unexpected response is
> received. However, the code was printing 'result' variable which is
> always 0 at that point, making the error message useless for debugging.
>
> Fix this by printing the actual UPIU response code returned by
> ufshcd_get_req_rsp().
Applied to 7.2/scsi-staging, thanks!
--
Martin K. Petersen
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] scsi: ufs: Fix wrong value printed in unexpected UPIU response case
2026-05-27 9:21 ` [PATCH] scsi: ufs: Fix wrong value printed in unexpected UPIU response case Chanwoo Lee
2026-05-27 16:08 ` Bart Van Assche
2026-06-02 1:59 ` Martin K. Petersen
@ 2026-06-09 1:38 ` Martin K. Petersen
2 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2026-06-09 1:38 UTC (permalink / raw)
To: alim.akhtar, avri.altman, bvanassche, James.Bottomley,
peter.wang, beanhuo, can.guo, adrian.hunter, linux-scsi,
linux-kernel, Chanwoo Lee
Cc: Martin K . Petersen
On Wed, 27 May 2026 18:21:34 +0900, Chanwoo Lee wrote:
> In ufshcd_transfer_rsp_status(), the default case of the inner switch
> statement prints the UPIU response code when an unexpected response is
> received. However, the code was printing 'result' variable which is
> always 0 at that point, making the error message useless for debugging.
>
> Fix this by printing the actual UPIU response code returned by
> ufshcd_get_req_rsp().
>
> [...]
Applied to 7.2/scsi-queue, thanks!
[1/1] scsi: ufs: Fix wrong value printed in unexpected UPIU response case
https://git.kernel.org/mkp/scsi/c/2483ae0a5623
--
Martin K. Petersen
^ permalink raw reply [flat|nested] 4+ messages in thread