Skip to content

Commit

Permalink
scsi: aacraid: Skip wellness sync on controller failure
Browse files Browse the repository at this point in the history
aac_command_thread checks on the health of controller periodically,
using aac_check_health. If the status is an error state KERNEL_PANIC or
anything else. The driver will attempt to restart the adapter, but the
response is not checked in aac_command_thread. This allows the periodic
sync to go thru and lead the driver to a hung state.

Fixed by terminating the periodic loop(intended per original design),
if the controller is not restored to a healthy state.

Cc: stable@vger.kernel.org
Fixes: 3d77d84 (scsi: aacraid: Added support for periodic wellness sync)
Signed-off-by: Raghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
Reviewed-by: David Carroll <David.Carroll@microsemi.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
  • Loading branch information
Raghava Aditya Renukunta authored and Martin K. Petersen committed Feb 22, 2017
1 parent a7e2c64 commit 849ac6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/aacraid/commsup.c
Original file line number Diff line number Diff line change
Expand Up @@ -2481,7 +2481,7 @@ int aac_command_thread(void *data)

/* Don't even try to talk to adapter if its sick */
ret = aac_check_health(dev);
if (!dev->queues)
if (ret || !dev->queues)
break;
next_check_jiffies = jiffies
+ ((long)(unsigned)check_interval)
Expand Down

0 comments on commit 849ac6a

Please sign in to comment.