From: "Peter Wang (王信友)" <peter.wang@mediatek.com>
To: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"bvanassche@acm.org" <bvanassche@acm.org>,
"avri.altman@wdc.com" <avri.altman@wdc.com>,
"jejb@linux.ibm.com" <jejb@linux.ibm.com>,
"alim.akhtar@samsung.com" <alim.akhtar@samsung.com>,
"martin.petersen@oracle.com" <martin.petersen@oracle.com>
Cc: "linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>,
"Jiajie Hao (郝加节)" <jiajie.hao@mediatek.com>,
"CC Chou (周志杰)" <cc.chou@mediatek.com>,
"Eddie Huang (黃智傑)" <eddie.huang@mediatek.com>,
"Alice Chao (趙珮均)" <Alice.Chao@mediatek.com>,
"Ed Tsai (蔡宗軒)" <Ed.Tsai@mediatek.com>,
wsd_upstream <wsd_upstream@mediatek.com>,
"quic_nguyenb@quicinc.com" <quic_nguyenb@quicinc.com>,
"stable@vger.kernel.org" <stable@vger.kernel.org>,
"Lin Gui (桂林)" <Lin.Gui@mediatek.com>,
"Chun-Hung Wu (巫駿宏)" <Chun-hung.Wu@mediatek.com>,
"Tun-yu Yu (游敦聿)" <Tun-yu.Yu@mediatek.com>,
"Chaotian Jing (井朝天)" <Chaotian.Jing@mediatek.com>,
"Powen Kao (高伯文)" <Powen.Kao@mediatek.com>,
"Naomi Chu (朱詠田)" <Naomi.Chu@mediatek.com>,
"Qilin Tan (谭麒麟)" <Qilin.Tan@mediatek.com>
Subject: Re: [PATCH v3 2/2] ufs: core: requeue aborted request
Date: Tue, 10 Sep 2024 05:40:34 +0000 [thread overview]
Message-ID: <2c93526e74cca5ac7ee6d952a80051733ea37c2c.camel@mediatek.com> (raw)
In-Reply-To: <c4d22b9c-2554-4871-94dc-3dae4bd62a5a@acm.org>
On Mon, 2024-09-09 at 09:34 -0700, Bart Van Assche wrote:
>
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
> On 9/9/24 1:21 AM, peter.wang@mediatek.com wrote:
> > diff --git a/drivers/ufs/core/ufs-mcq.c b/drivers/ufs/core/ufs-
> mcq.c
> > index 3903947dbed1..1f57ebf24a39 100644
> > --- a/drivers/ufs/core/ufs-mcq.c
> > +++ b/drivers/ufs/core/ufs-mcq.c
> > @@ -642,6 +642,7 @@ static bool ufshcd_mcq_sqe_search(struct
> ufs_hba *hba,
> > match = le64_to_cpu(utrd->command_desc_base_addr) & CQE_UCD_BA;
> > if (addr == match) {
> > ufshcd_mcq_nullify_sqe(utrd);
> > +lrbp->abort_initiated_by_err = true;
> > ret = true;
> > goto out;
> > }
>
> As mentioned before, I think that this change is wrong. Setting
> lrbp->abort_initiated_by_err affects the value of scsi_cmnd::result.
> This member variable is ignored for aborted commands. Although the
> above change does not affect the SCSI error handler, I think it
> should
> be left out because it will confuse anyone who reads the UFS driver
> code
> and who has not followed this discussion.
>
Hi Bart,
Since this is unlikely to happen and the code is not expected
to reach here, I think it's better to wait and see if it occurs.
And open a discussion on how to deal with this case if occurs.
I will remove it in the next version.
> > @@ -7561,6 +7552,16 @@ int ufshcd_try_to_abort_task(struct ufs_hba
> *hba, int tag)
> > goto out;
> > }
> >
> > +/*
> > + * When the host software receives a "FUNCTION COMPLETE", set flag
> > + * to requeue command after receive response with OCS_ABORTED
> > + * SDB mode: UTRLCLR Task Management response which means a
> Transfer
> > + * Request was aborted.
> > + * MCQ mode: Host will post to CQ with OCS_ABORTED after SQ
> cleanup
> > + */
> > +if (!err)
> > +lrbp->abort_initiated_by_err = true;
>
> Please add a comment that explains that the purpose of this code is
> to
> requeue commands aborted by ufshcd_abort_all().
>
Okay, I will add more comment.
> > + * @abort_initiated_by_err: abort initiated by error
>
> The member variable name and also the explanation of this member
> variable are incomprehensible to me.
>
I will add more flag description too.
Thanks.
Peter
> Thanks,
>
> Bart.
next prev parent reply other threads:[~2024-09-10 5:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-09 8:20 [PATCH v3 0/2] fix abort defect peter.wang
2024-09-09 8:20 ` [PATCH v3 1/2] ufs: core: fix the issue of ICU failure peter.wang
2024-09-09 14:51 ` Bao D. Nguyen
2024-09-09 16:24 ` Bart Van Assche
2024-09-09 8:21 ` [PATCH v3 2/2] ufs: core: requeue aborted request peter.wang
2024-09-09 16:34 ` Bart Van Assche
2024-09-10 5:40 ` Peter Wang (王信友) [this message]
2024-09-10 1:33 ` kernel test robot
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=2c93526e74cca5ac7ee6d952a80051733ea37c2c.camel@mediatek.com \
--to=peter.wang@mediatek.com \
--cc=Alice.Chao@mediatek.com \
--cc=Chaotian.Jing@mediatek.com \
--cc=Chun-hung.Wu@mediatek.com \
--cc=Ed.Tsai@mediatek.com \
--cc=Lin.Gui@mediatek.com \
--cc=Naomi.Chu@mediatek.com \
--cc=Powen.Kao@mediatek.com \
--cc=Qilin.Tan@mediatek.com \
--cc=Tun-yu.Yu@mediatek.com \
--cc=alim.akhtar@samsung.com \
--cc=avri.altman@wdc.com \
--cc=bvanassche@acm.org \
--cc=cc.chou@mediatek.com \
--cc=eddie.huang@mediatek.com \
--cc=jejb@linux.ibm.com \
--cc=jiajie.hao@mediatek.com \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=quic_nguyenb@quicinc.com \
--cc=stable@vger.kernel.org \
--cc=wsd_upstream@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