summaryrefslogtreecommitdiff
path: root/drivers/scsi
diff options
context:
space:
mode:
authorRaghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>2017-03-12 08:16:41 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-03-12 08:16:41 +0000
commit51c24a59301ae7a47b05a5594e7b39169667f82d (patch)
tree994b88da9ca8ba1a4b313df55ddaeaa4d1e5b80c /drivers/scsi
parentebf84b4166b6cfcddaaf7529262e2679059f9481 (diff)
parent2dc9a859eb8918ff86efdd0f2a570bcb3d9d6973 (diff)
scsi: aacraid: Reorder Adapter status check
am: 2dc9a859eb Change-Id: Idbd0d6bc38a75a802547ad44280c72f83d930604
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/aacraid/src.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/drivers/scsi/aacraid/src.c b/drivers/scsi/aacraid/src.c
index bc0203f3d243..e415e1c58eb5 100644
--- a/drivers/scsi/aacraid/src.c
+++ b/drivers/scsi/aacraid/src.c
@@ -413,16 +413,23 @@ static int aac_src_check_health(struct aac_dev *dev)
u32 status = src_readl(dev, MUnit.OMR);
/*
+ * Check to see if the board panic'd.
+ */
+ if (unlikely(status & KERNEL_PANIC))
+ goto err_blink;
+
+ /*
* Check to see if the board failed any self tests.
*/
if (unlikely(status & SELF_TEST_FAILED))
- return -1;
+ goto err_out;
/*
- * Check to see if the board panic'd.
+ * Check to see if the board failed any self tests.
*/
- if (unlikely(status & KERNEL_PANIC))
- return (status >> 16) & 0xFF;
+ if (unlikely(status & MONITOR_PANIC))
+ goto err_out;
+
/*
* Wait for the adapter to be up and running.
*/
@@ -432,6 +439,12 @@ static int aac_src_check_health(struct aac_dev *dev)
* Everything is OK
*/
return 0;
+
+err_out:
+ return -1;
+
+err_blink:
+ return (status > 16) & 0xFF;
}
/**