summaryrefslogtreecommitdiff
path: root/drivers/scsi/aacraid/linit.c
diff options
context:
space:
mode:
authorRaghava Aditya Renukunta <raghavaaditya.renukunta@pmcs.com>2016-02-04 02:06:06 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2016-02-24 05:27:02 +0300
commitfbd185986ebafaeac900a1af1829fed2bf03242e (patch)
tree90bbc9aad6b1e25c25b067d71da0449f237723e5 /drivers/scsi/aacraid/linit.c
parent222a9fb376df0f4aec32493a3fb5d18fa56979f2 (diff)
downloadlinux-fbd185986ebafaeac900a1af1829fed2bf03242e.tar.xz
aacraid: Fix AIF triggered IOP_RESET
while driver removal is in progress or PCI shutdown is invoked, driver kills AIF aacraid thread, but IOCTL requests from the management tools re-start AIF thread leading to IOP_RESET. Fixed by setting adapter_shutdown flag when PCI shutdown is invoked. Signed-off-by: Raghava Aditya Renukunta <raghavaaditya.renukunta@pmcs.com> Reviewed-by: Shane Seymour <shane.seymour@hpe.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Tomas Henzl <thenzl@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/aacraid/linit.c')
-rw-r--r--drivers/scsi/aacraid/linit.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
index 3f9c7415bd7e..334f2a602fca 100644
--- a/drivers/scsi/aacraid/linit.c
+++ b/drivers/scsi/aacraid/linit.c
@@ -705,7 +705,7 @@ static long aac_cfg_ioctl(struct file *file,
{
struct aac_dev *aac = (struct aac_dev *)file->private_data;
- if (!capable(CAP_SYS_RAWIO) || aac->adapter_shutdown)
+ if (!capable(CAP_SYS_RAWIO))
return -EPERM;
return aac_do_ioctl(aac, cmd, (void __user *)arg);
@@ -1072,6 +1072,8 @@ static void __aac_shutdown(struct aac_dev * aac)
int i;
int cpu;
+ aac_send_shutdown(aac);
+
if (aac->aif_thread) {
int i;
/* Clear out events first */
@@ -1083,7 +1085,6 @@ static void __aac_shutdown(struct aac_dev * aac)
}
kthread_stop(aac->thread);
}
- aac_send_shutdown(aac);
aac_adapter_disable_int(aac);
cpu = cpumask_first(cpu_online_mask);
if (aac->pdev->device == PMC_DEVICE_S6 ||