scsi: megaraid_sas: Do not re-fire shutdown DCMD after OCR
authorShivasharan S <shivasharan.srikanteshwara@broadcom.com>
Wed, 23 Aug 2017 11:46:59 +0000 (04:46 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 25 Aug 2017 02:29:12 +0000 (22:29 -0400)
Signed-off-by: Kashyap Desai <kashyap.desai@broadcom.com>
Signed-off-by: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Tomas Henzl <thenzl@redhat.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/megaraid/megaraid_sas_fusion.c

index d33e833ad32c721e54e4ce8aabc5a600acd744b8..6efa72a7ed5f82947378218d69fddd61a626ffd2 100644 (file)
@@ -3624,6 +3624,15 @@ void megasas_refire_mgmt_cmd(struct megasas_instance *instance)
 
                if (!smid)
                        continue;
+
+               /* Do not refire shutdown command */
+               if (le32_to_cpu(cmd_mfi->frame->dcmd.opcode) ==
+                       MR_DCMD_CTRL_SHUTDOWN) {
+                       cmd_mfi->frame->dcmd.cmd_status = MFI_STAT_OK;
+                       megasas_complete_cmd(instance, cmd_mfi, DID_OK);
+                       continue;
+               }
+
                req_desc = megasas_get_request_descriptor
                                        (instance, smid - 1);
                refire_cmd = req_desc && ((cmd_mfi->frame->dcmd.opcode !=