scsi: aacraid: Fix sync fibs time out on controller reset
authorRaghava Aditya Renukunta <RaghavaAditya.Renukunta@microsemi.com>
Thu, 16 Feb 2017 20:51:16 +0000 (12:51 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 22 Feb 2017 23:41:42 +0000 (18:41 -0500)
After controller shutdown, all sync fibs time out due to not knowing
about the switch to INT-x mode

Fixed by replacing aac_src_access_devreg() to aac_set_intx_mode() call.

Cc: stable@vger.kernel.org
Fixes: 495c021767bd78c998 (aacraid: MSI-x support)
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>
drivers/scsi/aacraid/aacraid.h
drivers/scsi/aacraid/comminit.c
drivers/scsi/aacraid/src.c

index b5a2c87f289b81ff61c90f9a67dcc2d0d6609d59..9281e7295480717e7e6973ee36c9af10f66521da 100644 (file)
@@ -2639,6 +2639,7 @@ void aac_hba_callback(void *context, struct fib *fibptr);
 #define fib_data(fibctx) ((void *)(fibctx)->hw_fib_va->data)
 struct aac_dev *aac_init_adapter(struct aac_dev *dev);
 void aac_src_access_devreg(struct aac_dev *dev, int mode);
+void aac_set_intx_mode(struct aac_dev *dev);
 int aac_get_config_status(struct aac_dev *dev, int commit_flag);
 int aac_get_containers(struct aac_dev *dev);
 int aac_scsi_cmd(struct scsi_cmnd *cmd);
index 40bfc57b68493afab33e1a1ce45d4e88446e3ec8..35607005f7e1fbf920581c772e7f0c000ee9d876 100644 (file)
@@ -330,7 +330,7 @@ int aac_send_shutdown(struct aac_dev * dev)
             dev->pdev->device == PMC_DEVICE_S8 ||
             dev->pdev->device == PMC_DEVICE_S9) &&
             dev->msi_enabled)
-               aac_src_access_devreg(dev, AAC_ENABLE_INTX);
+               aac_set_intx_mode(dev);
        return status;
 }
 
index c17b0603749cc6b5b62f34ded0e204d45cca2832..b23c818adbf68e0f99b582cb7026870ca1feb4f9 100644 (file)
@@ -657,7 +657,7 @@ static int aac_srcv_ioremap(struct aac_dev *dev, u32 size)
        return 0;
 }
 
-static void aac_set_intx_mode(struct aac_dev *dev)
+void aac_set_intx_mode(struct aac_dev *dev)
 {
        if (dev->msi_enabled) {
                aac_src_access_devreg(dev, AAC_ENABLE_INTX);