[SCSI] megaraid_sas: return sync cache call with success
authorSumant Patro <sumantp@lsil.com>
Wed, 14 Feb 2007 21:00:55 +0000 (13:00 -0800)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Fri, 16 Feb 2007 16:43:41 +0000 (10:43 -0600)
FW does not support SYNCHRONIZE_CACHE cmd. FW flush cache on its own.
So, we just return success from the megasas_queue_command.

Signed-off-by: Sumant Patro <sumant.patro@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/megaraid/megaraid_sas.c

index 4070894ed5f0074fd17058ba8467e6d333701b8f..01eb9b5870b5e0ff08f33bc02a6359a3c85a60d9 100644 (file)
@@ -856,6 +856,18 @@ megasas_queue_command(struct scsi_cmnd *scmd, void (*done) (struct scsi_cmnd *))
                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
+                */
+               scmd->result = DID_OK << 16;
+               goto out_done;
+       default:
+               break;
+       }
+
        cmd = megasas_get_cmd(instance);
        if (!cmd)
                return SCSI_MLQUEUE_HOST_BUSY;