Skip to contentSkip to conversation

scsi: megaraid_sas - return sync cache call with success

PATCH In review Sumant Patro 1 participant 1 message Feb 15, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 5/6 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.

---

 drivers/scsi/megaraid/megaraid_sas.c |   12 ++++++++++++
 1 files changed, 12 insertions(+)
drivers/scsi/megaraid/megaraid_sas.c +12 -0
diff -uprN linux-feb13-new-p4/drivers/scsi/megaraid/megaraid_sas.c linux-feb13-new-p5/drivers/scsi/megaraid/megaraid_sas.c
@@ -857,6 +857,18 @@ megasas_queue_command(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;
+	}
+
 	/* Check if we can accept cmds */
 	if (instance->is_busy) {
 		sec = (jiffies - instance->last_time) / HZ;