scsi: megaraid_sas: Update controller info during resume
authorShivasharan S <shivasharan.srikanteshwara@broadcom.com>
Mon, 4 Jun 2018 10:45:10 +0000 (03:45 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 4 Oct 2018 00:00:53 +0000 (17:00 -0700)
[ Upstream commit c3b10a55abc943a526aaecd7e860b15671beb906 ]

There is a possibility that firmware on the controller was upgraded before
system was suspended. During resume, driver needs to read updated
controller properties.

Signed-off-by: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/megaraid/megaraid_sas_base.c

index 985378e..d55c365 100644 (file)
@@ -6597,6 +6597,9 @@ megasas_resume(struct pci_dev *pdev)
                        goto fail_init_mfi;
        }
 
+       if (megasas_get_ctrl_info(instance) != DCMD_SUCCESS)
+               goto fail_init_mfi;
+
        tasklet_init(&instance->isr_tasklet, instance->instancet->tasklet,
                     (unsigned long)instance);