]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
scsi: aacraid: Skip wellness sync on controller failure
authorRaghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
Thu, 16 Feb 2017 20:51:17 +0000 (12:51 -0800)
committerSeth Forshee <seth.forshee@canonical.com>
Wed, 1 Mar 2017 13:15:16 +0000 (07:15 -0600)
BugLink: http://bugs.launchpad.net/bugs/1668726
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: 3d77d8404478353358 (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>
(cherry picked from linux-next commit 849ac6a591bf7b5777fdb6ce65030f32a7c73e1a)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/scsi/aacraid/commsup.c

index c10954b3cd46b5763fa7063568ad61f5e0d5c736..eb4d8cfc31945cec09f4375a0df92ab5d8756b2d 100644 (file)
@@ -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)