From: Bart Van Assche <bvanassche@acm.org>
To: Seunghui Lee <sh043.lee@samsung.com>,
linux-scsi@vger.kernel.org, Bean Huo <huobean@gmail.com>
Subject: Re: [PATCH v2] scsi: ufs: core: Fix error return with query response
Date: Tue, 21 Jan 2025 10:23:05 -0800 [thread overview]
Message-ID: <da2b7f34-506c-4de8-8322-5ec1fbae8873@acm.org> (raw)
In-Reply-To: <20250118023808.24726-1-sh043.lee@samsung.com>
On 1/17/25 6:38 PM, Seunghui Lee wrote:
> There is currently no mechanism to return error from query responses.
> Return the error and print the corresponding error message with it.
>
> Signed-off-by: Seunghui Lee <sh043.lee@samsung.com>
> ---
> Changes to v1:
> - modify the error message with response in UPIU(Bean Huo's suggestion)
> ---
> drivers/ufs/core/ufshcd.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
> index 9c26e8767515..97e50bccb95c 100644
> --- a/drivers/ufs/core/ufshcd.c
> +++ b/drivers/ufs/core/ufshcd.c
> @@ -3118,8 +3118,13 @@ ufshcd_dev_cmd_completion(struct ufs_hba *hba, struct ufshcd_lrb *lrbp)
> case UPIU_TRANSACTION_QUERY_RSP: {
> u8 response = lrbp->ucd_rsp_ptr->header.response;
>
> - if (response == 0)
> + if (response == 0) {
> err = ufshcd_copy_query_response(hba, lrbp);
> + } else {
> + err = -EINVAL;
> + dev_err(hba->dev, "%s: unexpected response in Query RSP: %x\n",
> + __func__, response);
> + }
> break;
> }
> case UPIU_TRANSACTION_REJECT_UPIU:
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
next prev parent reply other threads:[~2025-01-21 18:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20250118023817epcas1p1a7cb68709776f01c5ebeeb02908ed157@epcas1p1.samsung.com>
2025-01-18 2:38 ` [PATCH v2] scsi: ufs: core: Fix error return with query response Seunghui Lee
2025-01-21 13:10 ` Bean Huo
2025-01-21 18:23 ` Bart Van Assche [this message]
2025-02-04 3:33 ` 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=da2b7f34-506c-4de8-8322-5ec1fbae8873@acm.org \
--to=bvanassche@acm.org \
--cc=huobean@gmail.com \
--cc=linux-scsi@vger.kernel.org \
--cc=sh043.lee@samsung.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