From: Shivasharan S Date: Wed, 23 Aug 2017 11:46:59 +0000 (-0700) Subject: scsi: megaraid_sas: Do not re-fire shutdown DCMD after OCR X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=690e9c38858f870f4d83e7495feaca5417f65c6b;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git scsi: megaraid_sas: Do not re-fire shutdown DCMD after OCR Signed-off-by: Kashyap Desai Signed-off-by: Shivasharan S Reviewed-by: Hannes Reinecke Reviewed-by: Tomas Henzl Signed-off-by: Martin K. Petersen --- diff --git a/drivers/scsi/megaraid/megaraid_sas_fusion.c b/drivers/scsi/megaraid/megaraid_sas_fusion.c index d33e833ad32c..6efa72a7ed5f 100644 --- a/drivers/scsi/megaraid/megaraid_sas_fusion.c +++ b/drivers/scsi/megaraid/megaraid_sas_fusion.c @@ -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 !=