scsi: aacraid: Print ctrl status before eh reset
authorRaghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
Wed, 10 May 2017 16:39:42 +0000 (09:39 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 13 Jun 2017 00:47:59 +0000 (20:47 -0400)
Log the status of the controller before issuing a reset.

Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
Reviewed-by: David Carroll <david.carroll@microsemi.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/aacraid/linit.c

index 0a8d303..3dea438 100644 (file)
@@ -827,6 +827,7 @@ static int aac_eh_reset(struct scsi_cmnd* cmd)
        int count;
        u32 bus, cid;
        int ret = FAILED;
+       int status = 0;
 
        bus = aac_logical_to_phys(scmd_channel(cmd));
        cid = scmd_id(cmd);
@@ -921,6 +922,14 @@ static int aac_eh_reset(struct scsi_cmnd* cmd)
                pr_err("%s: Host adapter reset request. SCSI hang ?\n",
                                        AAC_DRIVERNAME);
 
+               /*
+                * Check the health of the controller
+                */
+               status = aac_adapter_check_health(aac);
+               if (status)
+                       dev_err(&aac->pdev->dev, "Adapter health - %d\n",
+                                                                       status);
+
                count = get_num_of_incomplete_fibs(aac);
                if (count == 0)
                        return SUCCESS;