From: Mahesh Rajashekhara <Mahesh.Rajashekhara@pmcs.com>
To: hare@suse.de, JBottomley@Parallels.com, linux-scsi@vger.kernel.org
Cc: Achim.Leubner@pmcs.com, Mahesh.Rajashekhara@pmcs.com
Subject: [V2 PATCH 08/11] aacraid: IOCTL fix
Date: Thu, 26 Mar 2015 10:41:29 -0400 [thread overview]
Message-ID: <1427380892-1978-9-git-send-email-Mahesh.Rajashekhara@pmcs.com> (raw)
In-Reply-To: <1427380892-1978-1-git-send-email-Mahesh.Rajashekhara@pmcs.com>
Add cfg IOCTL command fix
Signed-off-by: Mahesh Rajashekhara <Mahesh.Rajashekhara@pmcs.com>
---
drivers/scsi/aacraid/aacraid.h | 1 +
drivers/scsi/aacraid/comminit.c | 3 +++
drivers/scsi/aacraid/linit.c | 4 +++-
3 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h
index 9b469a4..43d8076 100644
--- a/drivers/scsi/aacraid/aacraid.h
+++ b/drivers/scsi/aacraid/aacraid.h
@@ -1222,6 +1222,7 @@ struct aac_dev
int msi_enabled; /* MSI/MSI-X enabled */
struct msix_entry msixentry[AAC_MAX_MSIX];
struct aac_msix_ctx aac_msix[AAC_MAX_MSIX]; /* context */
+ u8 adapter_shutdown;
};
#define aac_adapter_interrupt(dev) \
diff --git a/drivers/scsi/aacraid/comminit.c b/drivers/scsi/aacraid/comminit.c
index 284b1c5..27432b9 100644
--- a/drivers/scsi/aacraid/comminit.c
+++ b/drivers/scsi/aacraid/comminit.c
@@ -231,6 +231,7 @@ int aac_send_shutdown(struct aac_dev * dev)
/* FIB should be freed only after getting the response from the F/W */
if (status != -ERESTARTSYS)
aac_fib_free(fibctx);
+ dev->adapter_shutdown = 1;
if ((dev->pdev->device == PMC_DEVICE_S7 ||
dev->pdev->device == PMC_DEVICE_S8 ||
dev->pdev->device == PMC_DEVICE_S9) &&
@@ -400,6 +401,7 @@ struct aac_dev *aac_init_adapter(struct aac_dev *dev)
}
dev->max_msix = 0;
dev->msi_enabled = 0;
+ dev->adapter_shutdown = 0;
if ((!aac_adapter_sync_cmd(dev, GET_COMM_PREFERRED_SETTINGS,
0, 0, 0, 0, 0, 0,
status+0, status+1, status+2, status+3, status+4))
@@ -511,6 +513,7 @@ static void aac_define_int_mode(struct aac_dev *dev)
int i, msi_count;
+ msi_count = i = 0;
/* max. vectors from GET_COMM_PREFERRED_SETTINGS */
if (dev->max_msix == 0 ||
dev->pdev->device == PMC_DEVICE_S6 ||
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
index 75c3501..36653a9 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,
unsigned int cmd, unsigned long arg)
{
int ret;
- if (!capable(CAP_SYS_RAWIO))
+ struct aac_dev *aac;
+ aac = (struct aac_dev *)file->private_data;
+ if (!capable(CAP_SYS_RAWIO) || aac->adapter_shutdown)
return -EPERM;
mutex_lock(&aac_mutex);
ret = aac_do_ioctl(file->private_data, cmd, (void __user *)arg);
--
1.7.7.3
next prev parent reply other threads:[~2015-03-26 14:48 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-26 14:41 [V2 PATCH 00/11] aacraid driver updates Mahesh Rajashekhara
2015-03-26 14:41 ` [V2 PATCH 01/11] aacraid: AIF support for SES device add/remove Mahesh Rajashekhara
2015-03-27 10:12 ` Hannes Reinecke
2015-03-30 10:12 ` Murthy Bhat
2015-03-26 14:41 ` [V2 PATCH 02/11] aacraid: IOCTL pass-through command fix Mahesh Rajashekhara
2015-03-27 10:13 ` Hannes Reinecke
2015-03-30 10:13 ` Murthy Bhat
2015-03-26 14:41 ` [V2 PATCH 03/11] aacraid: 4KB sector support Mahesh Rajashekhara
2015-03-27 10:15 ` Hannes Reinecke
2015-03-27 10:59 ` Mahesh Rajashekhara
2015-03-27 11:03 ` Hannes Reinecke
2015-03-30 10:13 ` Murthy Bhat
2015-03-26 14:41 ` [V2 PATCH 04/11] aacraid: MSI-x support Mahesh Rajashekhara
2015-03-27 10:17 ` Hannes Reinecke
2015-03-30 10:13 ` Murthy Bhat
2015-03-27 13:28 ` Johannes Thumshirn
2015-03-27 17:03 ` Mahesh Rajashekhara
2015-03-26 14:41 ` [V2 PATCH 05/11] aacraid: vpd page code 0x83 support Mahesh Rajashekhara
2015-03-27 10:18 ` Hannes Reinecke
2015-03-30 10:14 ` Murthy Bhat
2015-03-26 14:41 ` [V2 PATCH 06/11] aacraid: 240 simple volume support Mahesh Rajashekhara
2015-03-27 10:19 ` Hannes Reinecke
2015-03-30 10:14 ` Murthy Bhat
2015-03-26 14:41 ` [V2 PATCH 07/11] aacraid: IOP RESET command handling changes Mahesh Rajashekhara
2015-03-27 10:20 ` Hannes Reinecke
2015-03-27 11:15 ` Mahesh Rajashekhara
2015-03-30 10:15 ` Murthy Bhat
2015-03-26 14:41 ` Mahesh Rajashekhara [this message]
2015-03-27 10:21 ` [V2 PATCH 08/11] aacraid: IOCTL fix Hannes Reinecke
2015-03-27 11:30 ` Mahesh Rajashekhara
2015-03-30 10:15 ` Murthy Bhat
2015-03-26 14:41 ` [V2 PATCH 09/11] aacraid: performance improvement changes Mahesh Rajashekhara
2015-03-27 10:22 ` Hannes Reinecke
2015-03-30 10:15 ` Murthy Bhat
2015-03-26 14:41 ` [V2 PATCH 10/11] aacraid: AIF raw device remove support Mahesh Rajashekhara
2015-03-27 10:22 ` Hannes Reinecke
2015-03-30 10:16 ` Murthy Bhat
2015-03-26 14:41 ` [V2 PATCH 11/11] aacraid: driver version change Mahesh Rajashekhara
2015-03-27 10:23 ` Hannes Reinecke
2015-03-30 10:16 ` Murthy Bhat
2015-04-06 11:02 ` [V2 PATCH 00/11] aacraid driver updates Mahesh Rajashekhara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1427380892-1978-9-git-send-email-Mahesh.Rajashekhara@pmcs.com \
--to=mahesh.rajashekhara@pmcs.com \
--cc=Achim.Leubner@pmcs.com \
--cc=JBottomley@Parallels.com \
--cc=hare@suse.de \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.