From: Minwoo Im <minwoo.im@samsung.com>
To: Sreekanth Reddy <sreekanth.reddy@broadcom.com>,
Minwoo Im <minwoo.im@samsung.com>
Cc: "sathya.prakash@broadcom.com" <sathya.prakash@broadcom.com>,
"suganath-prabu.subramani@broadcom.com"
<suganath-prabu.subramani@broadcom.com>,
"jejb@linux.ibm.com" <jejb@linux.ibm.com>,
"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
"MPT-FusionLinux.pdl@broadcom.com"
<MPT-FusionLinux.pdl@broadcom.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
Euihyeok Kwon <eh81.kwon@samsung.com>,
Sarah Cho <sohyeon.jo@samsung.com>,
Sanggwan Lee <sanggwan.lee@samsung.com>,
Gyeongmin Nam <gm.nam@samsung.com>,
"minwoo.im.dev@gmail.com" <minwoo.im.dev@gmail.com>
Subject: Re: [RESEND RFC PATCH] mpt3sas: support target smid for [abort|query] task
Date: Sun, 14 Jul 2019 11:17:52 +0900 [thread overview]
Message-ID: <20190714021752epcms2p6994026d1e2b3738f2857f8eff307c866@epcms2p6> (raw)
In-Reply-To: <CAK=zhgr_T8vA=BCdFCT37RxGCgS3xr8Wp9MEMK_9nZ=oYHy=7Q@mail.gmail.com>
Hi Sreekanth,
> > drivers/scsi/mpt3sas/mpt3sas_ctl.c | 10 ++++++----
> > 1 file changed, 6 insertions(+), 4 deletions(-)
> >
> > diff --git a/drivers/scsi/mpt3sas/mpt3sas_ctl.c
> b/drivers/scsi/mpt3sas/mpt3sas_ctl.c
> > index b2bb47c14d35..5c7539dae713 100644
> > --- a/drivers/scsi/mpt3sas/mpt3sas_ctl.c
> > +++ b/drivers/scsi/mpt3sas/mpt3sas_ctl.c
> > @@ -596,15 +596,17 @@ _ctl_set_task_mid(struct MPT3SAS_ADAPTER *ioc,
> struct mpt3_ioctl_command *karg,
> > if (priv_data->sas_target->handle != handle)
> > continue;
> > st = scsi_cmd_priv(scmd);
> > - tm_request->TaskMID = cpu_to_le16(st->smid);
> > - found = 1;
> > + if (tm_request->TaskMID == st->smid) {
>
> I think it will difficult for the user to find the smid that he want
> to abort. For this user has to enable the scsi logging level and get
> the tag and pass the ioctl with tag +1 value in TaskMID field. And
> hence currently driver will loop over all the smid's and if it fines
> any outstanding smid then it will issue task abort or task query TM
> for this outstanding smid to the HBA firmware.
Sreekanth,
You're exactly right because I have done this kind of abort based on
The scsi logs with logging level configured.
>
> May be we can do like below,
> * First check whether user provided "TaskMID" is non zero or not. if
> user provided TaskMID is non-zero and if this TaskMID is outstanding
> then driver will issue TaskAbort/QueryTask TM with this TaskMID value
Okay. If I get it right, you mean to check the given TaskMID(!=0) is
Outstanding or not is by an iteration first.
> else driver will loop over all the smid's and if finds any smid is
> outstanding then it will issue TaskAbort/QueryTask TM with TaskMID
> value set to outstanding smid.
Got your point here. I'll make a conditional statement for the case
where the TaskMID is zero which is the legacy behaviour.
> With the above logic still legacy application will be supported
> without breaking anything where they provide TaskMID filed as zero.
> And it also allows the user to abort the IO which he wants.
Sure, I'll prepare V2 patch soon.
Thanks Sreekanth,
Minwoo Im
prev parent reply other threads:[~2019-07-14 2:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20190621063708epcms2p309f4173afabe5de28942ba15d13987f7@epcms2p3>
2019-06-21 6:37 ` Minwoo Im
[not found] ` <CGME20190621063708epcms2p309f4173afabe5de28942ba15d13987f7@epcms2p7>
2019-06-27 7:39 ` Minwoo Im
2019-07-12 8:25 ` Sreekanth Reddy
[not found] ` <CGME20190621063708epcms2p309f4173afabe5de28942ba15d13987f7@epcms2p6>
2019-07-14 2:17 ` Minwoo Im [this message]
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=20190714021752epcms2p6994026d1e2b3738f2857f8eff307c866@epcms2p6 \
--to=minwoo.im@samsung.com \
--cc=MPT-FusionLinux.pdl@broadcom.com \
--cc=eh81.kwon@samsung.com \
--cc=gm.nam@samsung.com \
--cc=jejb@linux.ibm.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=minwoo.im.dev@gmail.com \
--cc=sanggwan.lee@samsung.com \
--cc=sathya.prakash@broadcom.com \
--cc=sohyeon.jo@samsung.com \
--cc=sreekanth.reddy@broadcom.com \
--cc=suganath-prabu.subramani@broadcom.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
all inboxes | Powered by JetHome®