scsi: aacraid: Reorder Adapter status check

am: 2dc9a859eb

Change-Id: Idbd0d6bc38a75a802547ad44280c72f83d930604
This commit is contained in:
Raghava Aditya Renukunta 2017-03-12 08:16:41 +00:00 committed by android-build-merger
commit 51c24a5930

View file

@ -412,17 +412,24 @@ static int aac_src_check_health(struct aac_dev *dev)
{
u32 status = src_readl(dev, MUnit.OMR);
/*
* Check to see if the board failed any self tests.
*/
if (unlikely(status & SELF_TEST_FAILED))
return -1;
/*
* Check to see if the board panic'd.
*/
if (unlikely(status & KERNEL_PANIC))
return (status >> 16) & 0xFF;
goto err_blink;
/*
* Check to see if the board failed any self tests.
*/
if (unlikely(status & SELF_TEST_FAILED))
goto err_out;
/*
* Check to see if the board failed any self tests.
*/
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;
}
/**