Linux kernel -stable discussions
 help / color / mirror / Atom feed
* Re: [PATCH v3 4/8] megaraid_sas: Send SYNCHRONIZE_CACHE for non-raid to firmware
       [not found] ` <1477056816-7058-5-git-send-email-kashyap.desai@broadcom.com>
@ 2016-10-21 16:02   ` Tomas Henzl
  2016-10-24 14:35   ` Hannes Reinecke
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 4+ messages in thread
From: Tomas Henzl @ 2016-10-21 16:02 UTC (permalink / raw)
  To: Kashyap Desai, linux-scsi; +Cc: martin.petersen, jejb, sumit.saxena, stable

On 21.10.2016 15:33, 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>

looks good
Reviewed-by: Tomas Henzl <thenzl@redhat.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);



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v3 4/8] megaraid_sas: Send SYNCHRONIZE_CACHE for non-raid to firmware
       [not found] ` <1477056816-7058-5-git-send-email-kashyap.desai@broadcom.com>
  2016-10-21 16:02   ` [PATCH v3 4/8] megaraid_sas: Send SYNCHRONIZE_CACHE for non-raid to firmware Tomas Henzl
@ 2016-10-24 14:35   ` Hannes Reinecke
  2016-10-24 16:00   ` Ewan D. Milne
  2016-10-25  1:33   ` Martin K. Petersen
  3 siblings, 0 replies; 4+ messages in thread
From: Hannes Reinecke @ 2016-10-24 14:35 UTC (permalink / raw)
  To: Kashyap Desai, linux-scsi
  Cc: martin.petersen, thenzl, jejb, sumit.saxena, stable

On 10/21/2016 03:33 PM, 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);
>
Reviewed-by: Hannes Reinecke <hare@suse.com>

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)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v3 4/8] megaraid_sas: Send SYNCHRONIZE_CACHE for non-raid to firmware
       [not found] ` <1477056816-7058-5-git-send-email-kashyap.desai@broadcom.com>
  2016-10-21 16:02   ` [PATCH v3 4/8] megaraid_sas: Send SYNCHRONIZE_CACHE for non-raid to firmware Tomas Henzl
  2016-10-24 14:35   ` Hannes Reinecke
@ 2016-10-24 16:00   ` Ewan D. Milne
  2016-10-25  1:33   ` Martin K. Petersen
  3 siblings, 0 replies; 4+ messages in thread
From: Ewan D. Milne @ 2016-10-24 16:00 UTC (permalink / raw)
  To: Kashyap Desai
  Cc: linux-scsi, martin.petersen, thenzl, jejb, sumit.saxena, stable

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>



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v3 4/8] megaraid_sas: Send SYNCHRONIZE_CACHE for non-raid to firmware
       [not found] ` <1477056816-7058-5-git-send-email-kashyap.desai@broadcom.com>
                     ` (2 preceding siblings ...)
  2016-10-24 16:00   ` Ewan D. Milne
@ 2016-10-25  1:33   ` Martin K. Petersen
  3 siblings, 0 replies; 4+ messages in thread
From: Martin K. Petersen @ 2016-10-25  1:33 UTC (permalink / raw)
  To: Kashyap Desai
  Cc: linux-scsi, martin.petersen, thenzl, jejb, sumit.saxena, stable

>>>>> "Kashyap" == Kashyap Desai <kashyap.desai@broadcom.com> writes:

Kashyap> Commit- " 02b01e0 [SCSI] megaraid_sas: return sync cache call
Kashyap> with success" added the code in driver to return
Kashyap> SYNCHRONIZE_CACHE without sending it to firmware back in
Kashyap> 2007. Earlier MR was mainly for Virtual Disk, so same code
Kashyap> continue for JBOD as well whenever JBOD support was added and
Kashyap> it introduced bug that SYNCHRONIZE_CACHE is not passed to FW
Kashyap> for JBOD (non Raid disk).

Kashyap> But our recent analysis indicates that, From Day-1 MR Firmware
Kashyap> always expect Driver to forward SYNCHRONIZE_CACHE for JBOD (non
Kashyap> Raid disk) to the Firmware.  We have fixed this as part of this
Kashyap> patch.

Applied to 4.9/scsi-fixes.

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-10-25  1:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1477056816-7058-1-git-send-email-kashyap.desai@broadcom.com>
     [not found] ` <1477056816-7058-5-git-send-email-kashyap.desai@broadcom.com>
2016-10-21 16:02   ` [PATCH v3 4/8] megaraid_sas: Send SYNCHRONIZE_CACHE for non-raid to firmware Tomas Henzl
2016-10-24 14:35   ` Hannes Reinecke
2016-10-24 16:00   ` Ewan D. Milne
2016-10-25  1:33   ` Martin K. Petersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox