From: Shivasharan Srikanteshwara <shivasharan.srikanteshwara@broadcom.com>
To: Hannes Reinecke <hare@suse.de>, linux-scsi@vger.kernel.org
Cc: martin.petersen@oracle.com, thenzl@redhat.com,
jejb@linux.vnet.ibm.com,
Kashyap Desai <kashyap.desai@broadcom.com>,
Sumit Saxena <sumit.saxena@broadcom.com>,
hare@suse.com, hch@lst.de
Subject: RE: [PATCH 05/15] megaraid_sas: Do not re-fire shutdown DCMD after OCR
Date: Wed, 5 Jul 2017 16:03:38 +0530 [thread overview]
Message-ID: <35a7235b7ad57d9f485d1e63fa8eb7b0@mail.gmail.com> (raw)
In-Reply-To: 471fa32287b0704baab2a321f68f0d5e@mail.gmail.com
> -----Original Message-----
> From: Shivasharan Srikanteshwara
> [mailto:shivasharan.srikanteshwara@broadcom.com]
> Sent: Tuesday, July 04, 2017 12:39 PM
> To: 'Hannes Reinecke'; 'linux-scsi@vger.kernel.org'
> Cc: 'martin.petersen@oracle.com'; 'thenzl@redhat.com';
> 'jejb@linux.vnet.ibm.com'; Kashyap Desai; Sumit Saxena; 'hare@suse.com';
> 'hch@lst.de'
> Subject: RE: [PATCH 05/15] megaraid_sas: Do not re-fire shutdown DCMD
> after
> OCR
>
> > -----Original Message-----
> > From: Hannes Reinecke [mailto:hare@suse.de]
> > Sent: Friday, June 30, 2017 7:00 PM
> > To: Shivasharan S; linux-scsi@vger.kernel.org
> > Cc: martin.petersen@oracle.com; thenzl@redhat.com;
> > jejb@linux.vnet.ibm.com; kashyap.desai@broadcom.com;
> > sumit.saxena@broadcom.com; hare@suse.com; hch@lst.de
> > Subject: Re: [PATCH 05/15] megaraid_sas: Do not re-fire shutdown DCMD
> > after OCR
> >
> > On 06/30/2017 10:29 AM, Shivasharan S wrote:
> > > Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com>
> > > Signed-off-by: Shivasharan S
> > > <shivasharan.srikanteshwara@broadcom.com>
> > > ---
> > > drivers/scsi/megaraid/megaraid_sas_fusion.c | 9 +++++++++
> > > 1 file changed, 9 insertions(+)
> > >
> > > diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c
> > > b/drivers/scsi/megaraid/megaraid_sas_fusion.c
> > > index 0f13c58..a308e14 100644
> > > --- a/drivers/scsi/megaraid/megaraid_sas_fusion.c
> > > +++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c
> > > @@ -3618,6 +3618,15 @@ void megasas_refire_mgmt_cmd(struct
> > > megasas_instance *instance)
> > >
> > > if (!smid)
> > > continue;
> > > +
> > > + /* Do not refire shutdown command */
> > > + if (le32_to_cpu(cmd_mfi->frame->dcmd.opcode) ==
> > > + MR_DCMD_CTRL_SHUTDOWN) {
> > > + cmd_mfi->frame->dcmd.cmd_status = MFI_STAT_OK;
> > > + megasas_complete_cmd(instance, cmd_mfi, DID_OK);
> > > + continue;
> > > + }
> > > +
> > > req_desc = megasas_get_request_descriptor
> > > (instance, smid - 1);
> > > refire_cmd = req_desc && ((cmd_mfi->frame->dcmd.opcode !=
> > >
> > Please, no.
> > You already have a selector further down whether to refire the
> > command, pending on the DRV_DCMD_SKIP_REFIRE flag.
> > If you always set this flag for the shutdown command you wouldn't need
> > to touch this at all.
> > And if you particularly dislike that solution convert the 'refire_cmd ='
> > statement into a proper switch and blank it out from there.
> >
>
> Hi Hannes,
> The management commands that get skipped further down in this function are
> internally generated by the driver itself so we don’t need to complete it
> back to
> the application.
> In case of shutdown DCMD, it’s an IOCTL command(issued by application) so
> we
> need to return status back to application.
> Combining handling of both the cases or using DRV_DCMD_SKIP_REFIRE will
> not
> be as straightforward.
>
> Thanks,
> Shivasharan
>
Hi Hannes,
We will implement the switch case approach during our next submission as
this
the current code is well tested internally and want to avoid regressions.
Are you ok if we keep it this way for now?
Thanks,
Shivasharan
> > Cheers,
> >
> > Hannes
> > --
> > Dr. Hannes Reinecke Teamlead Storage & Networking
> > hare@suse.de +49 911 74053 688
> > SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
> > GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton HRB
> > 21284 (AG
> > Nürnberg)
next prev parent reply other threads:[~2017-07-05 10:33 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-30 8:29 [PATCH 00/15] megaraid_sas: Updates for scsi-next Shivasharan S
2017-06-30 8:29 ` [PATCH 01/15] megaraid_sas: mismatch of allocated MFI frame size and length exposed in MFI MPT pass through command Shivasharan S
2017-06-30 13:23 ` Hannes Reinecke
2017-06-30 8:29 ` [PATCH 02/15] megaraid_sas: set minimum value of resetwaittime to be 1 secs Shivasharan S
2017-06-30 13:23 ` Hannes Reinecke
2017-06-30 8:29 ` [PATCH 03/15] megaraid_sas: Use synchronize_irq in target reset case Shivasharan S
2017-06-30 13:24 ` Hannes Reinecke
2017-06-30 8:29 ` [PATCH 04/15] megaraid_sas: Call megasas_complete_cmd_dpc_fusion every 1 second while there are pending commands Shivasharan S
2017-06-30 13:25 ` Hannes Reinecke
2017-07-04 7:05 ` Shivasharan Srikanteshwara
2017-06-30 8:29 ` [PATCH 05/15] megaraid_sas: Do not re-fire shutdown DCMD after OCR Shivasharan S
2017-06-30 13:30 ` Hannes Reinecke
2017-07-04 7:08 ` Shivasharan Srikanteshwara
2017-07-05 10:33 ` Shivasharan Srikanteshwara [this message]
2017-07-05 10:34 ` Hannes Reinecke
2017-06-30 8:30 ` [PATCH 06/15] megaraid_sas: Fix endianness issues in DCMD handling Shivasharan S
2017-06-30 13:34 ` Hannes Reinecke
2017-06-30 8:30 ` [PATCH 07/15] megaraid_sas: Check valid aen class range to avoid kernel panic Shivasharan S
2017-06-30 13:35 ` Hannes Reinecke
2017-06-30 8:30 ` [PATCH 08/15] megaraid_sas: Use SMID for Task abort case only Shivasharan S
2017-06-30 13:35 ` Hannes Reinecke
2017-06-30 8:30 ` [PATCH 09/15] megaraid_sas: use vmalloc for crash dump buffers and driver's local RAID map Shivasharan S
2017-06-30 13:36 ` Hannes Reinecke
2017-06-30 14:30 ` Tomas Henzl
2017-07-03 7:13 ` Shivasharan Srikanteshwara
2017-06-30 8:30 ` [PATCH 10/15] megaraid_sas: Return pended IOCTLs with cmd_status MFI_STAT_WRONG_STATE in case adapter is dead Shivasharan S
2017-06-30 13:37 ` Hannes Reinecke
2017-06-30 8:30 ` [PATCH 11/15] megaraid_sas: Set device queue_depth same as HBA can_queue value in scsi-mq mode Shivasharan S
2017-06-30 13:39 ` Hannes Reinecke
2017-07-04 7:22 ` Shivasharan Srikanteshwara
2017-06-30 8:30 ` [PATCH 12/15] megaraid_sas: replace internal FALSE/TRUE definitions with false/true Shivasharan S
2017-06-30 13:40 ` Hannes Reinecke
2017-06-30 8:30 ` [PATCH 13/15] megaraid_sas: modified few prints in OCR and IOC INIT path Shivasharan S
2017-06-30 13:40 ` Hannes Reinecke
2017-06-30 8:30 ` [PATCH 14/15] megaraid_sas: call megasas_dump_frame with correct IO frame size Shivasharan S
2017-06-30 13:41 ` Hannes Reinecke
2017-06-30 8:30 ` [PATCH 15/15] megaraid_sas: driver version upgrade Shivasharan S
2017-06-30 13:41 ` Hannes Reinecke
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=35a7235b7ad57d9f485d1e63fa8eb7b0@mail.gmail.com \
--to=shivasharan.srikanteshwara@broadcom.com \
--cc=hare@suse.com \
--cc=hare@suse.de \
--cc=hch@lst.de \
--cc=jejb@linux.vnet.ibm.com \
--cc=kashyap.desai@broadcom.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=sumit.saxena@broadcom.com \
--cc=thenzl@redhat.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