[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190714021752epcms2p6994026d1e2b3738f2857f8eff307c866@epcms2p6>
Date: Sun, 14 Jul 2019 11:17:52 +0900
From: Minwoo Im <minwoo.im@...sung.com>
To: Sreekanth Reddy <sreekanth.reddy@...adcom.com>,
Minwoo Im <minwoo.im@...sung.com>
CC: "sathya.prakash@...adcom.com" <sathya.prakash@...adcom.com>,
"suganath-prabu.subramani@...adcom.com"
<suganath-prabu.subramani@...adcom.com>,
"jejb@...ux.ibm.com" <jejb@...ux.ibm.com>,
"martin.petersen@...cle.com" <martin.petersen@...cle.com>,
"MPT-FusionLinux.pdl@...adcom.com" <MPT-FusionLinux.pdl@...adcom.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
"linux-block@...r.kernel.org" <linux-block@...r.kernel.org>,
Euihyeok Kwon <eh81.kwon@...sung.com>,
Sarah Cho <sohyeon.jo@...sung.com>,
Sanggwan Lee <sanggwan.lee@...sung.com>,
Gyeongmin Nam <gm.nam@...sung.com>,
"minwoo.im.dev@...il.com" <minwoo.im.dev@...il.com>
Subject: Re: [RESEND RFC PATCH] mpt3sas: support target smid for
[abort|query] task
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
Powered by blists - more mailing lists