Skip to content

Commit 02b01e0

Browse files
Sumant PatroJames Bottomley
authored andcommitted
[SCSI] megaraid_sas: return sync cache call with success
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>
1 parent 9f35fa8 commit 02b01e0

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

drivers/scsi/megaraid/megaraid_sas.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -856,6 +856,18 @@ megasas_queue_command(struct scsi_cmnd *scmd, void (*done) (struct scsi_cmnd *))
856856
goto out_done;
857857
}
858858

859+
switch (scmd->cmnd[0]) {
860+
case SYNCHRONIZE_CACHE:
861+
/*
862+
* FW takes care of flush cache on its own
863+
* No need to send it down
864+
*/
865+
scmd->result = DID_OK << 16;
866+
goto out_done;
867+
default:
868+
break;
869+
}
870+
859871
cmd = megasas_get_cmd(instance);
860872
if (!cmd)
861873
return SCSI_MLQUEUE_HOST_BUSY;

0 commit comments

Comments
 (0)