From: John Garry <john.g.garry@oracle.com>
To: Bart Van Assche <bvanassche@acm.org>,
daejun7.park@samsung.com,
"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"James E.J. Bottomley" <jejb@linux.ibm.com>,
Stanley Chu <stanley.chu@mediatek.com>,
Can Guo <quic_cang@quicinc.com>,
Manivannan Sadhasivam <mani@kernel.org>,
Asutosh Das <quic_asutoshd@quicinc.com>,
Bean Huo <beanhuo@micron.com>,
"Bao D. Nguyen" <quic_nguyenb@quicinc.com>,
Arthur Simchaev <Arthur.Simchaev@wdc.com>
Subject: Re: [PATCH 1/4] scsi: ufs: Return in case of an invalid tag
Date: Wed, 20 Sep 2023 08:13:50 +0100 [thread overview]
Message-ID: <dd2ccd9e-a255-51dd-068b-ebc28811c237@oracle.com> (raw)
In-Reply-To: <9a382188-14d2-4142-831d-223c6823f316@acm.org>
On 20/09/2023 00:29, Bart Van Assche wrote:
>> diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
>> index dc1285351336..5fccec3c1091 100644
>> --- a/drivers/ufs/core/ufshcd.c
>> +++ b/drivers/ufs/core/ufshcd.c
>> @@ -2822,7 +2822,8 @@ static int ufshcd_queuecommand(struct Scsi_Host
>> *host, struct scsi_cmnd *cmd)
>> int err = 0;
>> struct ufs_hw_queue *hwq = NULL;
>> - WARN_ONCE(tag < 0 || tag >= hba->nutrs, "Invalid tag %d\n",
>> tag);
How is tag < 0 even possible? Indeed, I doubt the tag >= hba->nutrs
check also, since shost->can_queue is set to hba->nutrs -
UFSHCD_NUM_RESERVED AFAICS
John
>> + if (WARN_ONCE(tag < 0 || tag >= hba->nutrs, "Invalid tag
>> %d\n", tag))
>> + return 0;
>
> As far as I know, a return 0 from a queuecommand means that the request
> was accepted by LLD.
next prev parent reply other threads:[~2023-09-20 7:14 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-18 16:20 [PATCH 0/4] UFS core patches Bart Van Assche
2023-09-18 16:20 ` [PATCH 1/4] scsi: ufs: Return in case of an invalid tag Bart Van Assche
2023-09-19 22:47 ` Daejun Park
2023-09-19 23:29 ` Bart Van Assche
2023-09-20 7:13 ` John Garry [this message]
2023-09-20 14:40 ` Bart Van Assche
2023-09-18 16:20 ` [PATCH 2/4] scsi: ufs: Move the 4K alignment code into the Exynos driver Bart Van Assche
2023-09-18 16:20 ` [PATCH 3/4] scsi: ufs: Simplify ufshcd_comp_scsi_upiu() Bart Van Assche
2023-09-18 16:20 ` [PATCH 4/4] scsi: ufs: Set the Command Priority (CP) flag for RT requests Bart Van Assche
2023-09-19 18:37 ` Avri Altman
2023-09-19 21:05 ` Bart Van Assche
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=dd2ccd9e-a255-51dd-068b-ebc28811c237@oracle.com \
--to=john.g.garry@oracle.com \
--cc=Arthur.Simchaev@wdc.com \
--cc=beanhuo@micron.com \
--cc=bvanassche@acm.org \
--cc=daejun7.park@samsung.com \
--cc=jejb@linux.ibm.com \
--cc=linux-scsi@vger.kernel.org \
--cc=mani@kernel.org \
--cc=martin.petersen@oracle.com \
--cc=quic_asutoshd@quicinc.com \
--cc=quic_cang@quicinc.com \
--cc=quic_nguyenb@quicinc.com \
--cc=stanley.chu@mediatek.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