From: Bart Van Assche <bvanassche@acm.org>
To: Stanley Chu <stanley.chu@mediatek.com>,
Avri Altman <Avri.Altman@wdc.com>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
"andy.teng@mediatek.com" <andy.teng@mediatek.com>,
"jejb@linux.ibm.com" <jejb@linux.ibm.com>,
"chun-hung.wu@mediatek.com" <chun-hung.wu@mediatek.com>,
"kuohong.wang@mediatek.com" <kuohong.wang@mediatek.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"cang@codeaurora.org" <cang@codeaurora.org>,
"linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>,
"peter.wang@mediatek.com" <peter.wang@mediatek.com>,
"alim.akhtar@samsung.com" <alim.akhtar@samsung.com>,
"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
"beanhuo@micron.com" <beanhuo@micron.com>,
"chaotian.jing@mediatek.com" <chaotian.jing@mediatek.com>,
"cc.chou@mediatek.com" <cc.chou@mediatek.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"asutoshd@codeaurora.org" <asutoshd@codeaurora.org>
Subject: Re: [PATCH v4] scsi: ufs: Cleanup completed request without interrupt notification
Date: Thu, 30 Jul 2020 21:06:41 -0700 [thread overview]
Message-ID: <97f1dfb0-41b6-0249-3e82-cae480b0efb6@acm.org> (raw)
In-Reply-To: <1596159018.17247.53.camel@mtkswgap22>
On 2020-07-30 18:30, Stanley Chu wrote:
> On Mon, 2020-07-27 at 11:18 +0000, Avri Altman wrote:
>> Looks good to me.
>> But better wait and see if Bart have any further reservations.
>
> Would you have any further suggestions?
Today is the first time that I took a look at ufshcd_abort(). The
approach of that function looks wrong to me. This is how I think that a
SCSI LLD abort handler should work:
(1) Serialize against the completion path
(__ufshcd_transfer_req_compl()) such that it cannot happen that the
abort handler and the regular completion path both call
cmd->scsi_done(cmd) at the same time. I'm not sure whether an existing
synchronization object can be used for this purpose or whether a new
synchronization object has to be introduced to serialize scsi_done()
calls from __ufshcd_transfer_req_compl() and ufshcd_abort().
(2) While holding that synchronization object, check whether the SCSI
command is still outstanding. If so, submit a SCSI abort TMR to the device.
(3) If the command has been aborted, call scsi_done() and return
SUCCESS. If aborting failed and the command is still in progress, return
FAILED.
An example is available in srp_abort() in
drivers/infiniband/ulp/srp/ib_srp.c.
Bart.
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek
next prev parent reply other threads:[~2020-07-31 4:07 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-24 14:02 [PATCH v4] scsi: ufs: Cleanup completed request without interrupt notification Stanley Chu
2020-07-27 11:18 ` Avri Altman
2020-07-31 1:30 ` Stanley Chu
2020-07-31 4:06 ` Bart Van Assche [this message]
2020-07-31 8:00 ` Can Guo
2020-07-31 16:51 ` Bart Van Assche
2020-07-31 23:17 ` Can Guo
2020-08-03 3:00 ` Stanley Chu
2020-08-03 5:14 ` Can Guo
2020-08-03 5:27 ` Stanley Chu
2020-08-03 3:12 ` Bart Van Assche
2020-08-03 5:07 ` Can Guo
2020-08-04 10:01 ` Can Guo
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=97f1dfb0-41b6-0249-3e82-cae480b0efb6@acm.org \
--to=bvanassche@acm.org \
--cc=Avri.Altman@wdc.com \
--cc=alim.akhtar@samsung.com \
--cc=andy.teng@mediatek.com \
--cc=asutoshd@codeaurora.org \
--cc=beanhuo@micron.com \
--cc=cang@codeaurora.org \
--cc=cc.chou@mediatek.com \
--cc=chaotian.jing@mediatek.com \
--cc=chun-hung.wu@mediatek.com \
--cc=jejb@linux.ibm.com \
--cc=kuohong.wang@mediatek.com \
--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=martin.petersen@oracle.com \
--cc=matthias.bgg@gmail.com \
--cc=peter.wang@mediatek.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;
as well as URLs for NNTP newsgroup(s).