linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Ewan D. Milne" <emilne@redhat.com>
To: Kashyap Desai <kashyap.desai@broadcom.com>
Cc: linux-scsi@vger.kernel.org, martin.petersen@oracle.com,
	thenzl@redhat.com, jejb@linux.vnet.ibm.com,
	sumit.saxena@broadcom.com, stable@vger.kernel.org
Subject: Re: [PATCH v3 4/8] megaraid_sas: Send SYNCHRONIZE_CACHE for non-raid to firmware
Date: Mon, 24 Oct 2016 12:00:13 -0400	[thread overview]
Message-ID: <1477324813.17595.6.camel@localhost.localdomain> (raw)
In-Reply-To: <1477056816-7058-5-git-send-email-kashyap.desai@broadcom.com>

On Fri, 2016-10-21 at 06:33 -0700, Kashyap Desai wrote:
> Commit- " 02b01e0 [SCSI] megaraid_sas: return sync cache call with success"
> added the code in driver to return SYNCHRONIZE_CACHE without sending it to
> firmware back in 2007. Earlier MR was mainly for Virtual Disk,
> so same code continue for JBOD as well whenever JBOD support was added and it introduced bug that
> SYNCHRONIZE_CACHE is not passed to FW for JBOD (non Raid disk).
> 
> But our recent analysis indicates that, From Day-1 MR Firmware always
> expect Driver to forward SYNCHRONIZE_CACHE for JBOD (non Raid disk) to the
> Firmware.
> We have fixed this as part of this patch.
> 
> CC: stable@vger.kernel.org
> Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com>
> Signed-off-by: Sumit Saxena <sumit.saxena@broadcom.com>
> ---
>  drivers/scsi/megaraid/megaraid_sas_base.c | 13 +++++--------
>  1 file changed, 5 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c b/drivers/scsi/megaraid/megaraid_sas_base.c
> index ba57be6..c98d4f9 100644
> --- a/drivers/scsi/megaraid/megaraid_sas_base.c
> +++ b/drivers/scsi/megaraid/megaraid_sas_base.c
> @@ -1700,16 +1700,13 @@ megasas_queue_command(struct Scsi_Host *shost, struct scsi_cmnd *scmd)
>  		goto out_done;
>  	}
>  
> -	switch (scmd->cmnd[0]) {
> -	case SYNCHRONIZE_CACHE:
> -		/*
> -		 * FW takes care of flush cache on its own
> -		 * No need to send it down
> -		 */
> +	/*
> +	 * FW takes care of flush cache on its own for Virtual Disk.
> +	 * No need to send it down for VD. For JBOD send SYNCHRONIZE_CACHE to FW.
> +	 */
> +	if ((scmd->cmnd[0] == SYNCHRONIZE_CACHE) && MEGASAS_IS_LOGICAL(scmd)) {
>  		scmd->result = DID_OK << 16;
>  		goto out_done;
> -	default:
> -		break;
>  	}
>  
>  	return instance->instancet->build_and_issue_cmd(instance, scmd);

Along with 4/8 in this v3 series...

Reviewed-by: Ewan D. Milne <emilne@redhat.com>



  parent reply	other threads:[~2016-10-24 16:00 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-21 13:33 [PATCH v3 0/7] megaraid_sas: Updates for scsi-next Kashyap Desai
2016-10-21 13:33 ` [PATCH v3 1/8] megaraid_sas: For SRIOV enabled firmware, ensure VF driver waits for 30secs before reset Kashyap Desai
2016-10-21 13:33 ` [PATCH v3 2/8] megaraid_sas: Send correct PhysArm to FW for R1 VD downgrade Kashyap Desai
2016-10-21 13:33 ` [PATCH v3 3/8] megaraid_sas: Do not fire DCMDs during PCI shutdown/detach Kashyap Desai
2016-10-24 14:34   ` Hannes Reinecke
2016-10-21 13:33 ` [PATCH v3 4/8] megaraid_sas: Send SYNCHRONIZE_CACHE for non-raid to firmware Kashyap Desai
2016-10-21 16:02   ` Tomas Henzl
2016-10-24 14:35   ` Hannes Reinecke
2016-10-24 16:00   ` Ewan D. Milne [this message]
2016-10-25  1:33   ` Martin K. Petersen
2016-10-21 13:33 ` [PATCH v3 5/8] megaraid_sas: Send SYNCHRONIZE_CACHE for VD " Kashyap Desai
2016-10-21 15:59   ` Tomas Henzl
2016-10-24 14:36   ` Hannes Reinecke
2016-10-24 16:00   ` Ewan D. Milne
2016-10-21 13:33 ` [PATCH v3 6/8] MAINTAINERS: Update megaraid maintainers list Kashyap Desai
2016-11-08 14:50   ` Tomas Henzl
2016-10-21 13:33 ` [PATCH v3 7/8] megaraid_sas: Do not set MPI2_TYPE_CUDA for JBOD FP path for FW which does not support JBOD sequence map Kashyap Desai
2016-10-21 13:33 ` [PATCH v3 8/8] megaraid_sas: driver version upgrade Kashyap Desai
2016-10-24 14:36   ` Hannes Reinecke
2016-11-08 23:05   ` Martin K. Petersen
2016-10-25  2:01 ` [PATCH v3 0/7] megaraid_sas: Updates for scsi-next Martin K. Petersen

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=1477324813.17595.6.camel@localhost.localdomain \
    --to=emilne@redhat.com \
    --cc=jejb@linux.vnet.ibm.com \
    --cc=kashyap.desai@broadcom.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=stable@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).