aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aacraid/linit.c
diff options
context:
space:
mode:
authorMahesh Rajashekhara <Mahesh.Rajashekhara@pmcs.com>2015-03-26 10:41:29 -0400
committerJames Bottomley <JBottomley@Odin.com>2015-04-09 19:54:40 -0400
commitf9c4259678cbde854a4e94398d66ef379178fd7c (patch)
tree98622484a949c8de2377fc06983a80eeccbc1ced /drivers/scsi/aacraid/linit.c
parentdafde947bce37b10f3681d6b9df473ba7136fc05 (diff)
aacraid: IOCTL fix
After getting the platform shutdown command "VM_CloseAll" response from the firmware, driver was getting configuration IOCTL request from the upper layers and it sends down to firmware. This causes firmware assert issue. This patch fixes the firmware assert issue. During the shutdown, if driver gets commands from the upper layer, driver sends error code to the upper layers. Signed-off-by: Mahesh Rajashekhara <Mahesh.Rajashekhara@pmcs.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Reviewed-by: Murthy Bhat <Murthy.Bhat@pmcs.com> Signed-off-by: James Bottomley <JBottomley@Odin.com>
Diffstat (limited to 'drivers/scsi/aacraid/linit.c')
-rw-r--r--drivers/scsi/aacraid/linit.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
index 75c3501e51b3..36653a9d9ade 100644
--- a/drivers/scsi/aacraid/linit.c
+++ b/drivers/scsi/aacraid/linit.c
@@ -713,7 +713,9 @@ static long aac_cfg_ioctl(struct file *file,
713 unsigned int cmd, unsigned long arg) 713 unsigned int cmd, unsigned long arg)
714{ 714{
715 int ret; 715 int ret;
716 if (!capable(CAP_SYS_RAWIO)) 716 struct aac_dev *aac;
717 aac = (struct aac_dev *)file->private_data;
718 if (!capable(CAP_SYS_RAWIO) || aac->adapter_shutdown)
717 return -EPERM; 719 return -EPERM;
718 mutex_lock(&aac_mutex); 720 mutex_lock(&aac_mutex);
719 ret = aac_do_ioctl(file->private_data, cmd, (void __user *)arg); 721 ret = aac_do_ioctl(file->private_data, cmd, (void __user *)arg);