diff options
author | Mark Haverkamp <markh@linux-foundation.org> | 2007-03-15 13:27:21 -0400 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2007-03-20 11:55:05 -0400 |
commit | 33bb3b296207ff4f9e3b8dddb623e645ee1b8809 (patch) | |
tree | 9f8ccb325f7880e64668e6d41671ff32949a4b12 /drivers/scsi/aacraid/commctrl.c | |
parent | fe76df4235986cfacc2d3b71cef7c42bc1a6dd6c (diff) |
[SCSI] aacraid: Fix ioctl handling when adapter resets
Received from Mark Salyzyn,
Outstanding ioctl calls still have some problems with aborting cleanly
in the face of a reset iop recovery action should the adapter ever enter
into a Firmware Assert (BlinkLED) condition. The enclosed patch resolves
some uncovered flawed handling.
Signed-off-by: Mark Haverkamp <markh@linux-foundation.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/aacraid/commctrl.c')
-rw-r--r-- | drivers/scsi/aacraid/commctrl.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/scsi/aacraid/commctrl.c b/drivers/scsi/aacraid/commctrl.c index 83d5680e1326..3a8e7cac9ee2 100644 --- a/drivers/scsi/aacraid/commctrl.c +++ b/drivers/scsi/aacraid/commctrl.c | |||
@@ -64,6 +64,9 @@ static int ioctl_send_fib(struct aac_dev * dev, void __user *arg) | |||
64 | unsigned size; | 64 | unsigned size; |
65 | int retval; | 65 | int retval; |
66 | 66 | ||
67 | if (dev->in_reset) { | ||
68 | return -EBUSY; | ||
69 | } | ||
67 | fibptr = aac_fib_alloc(dev); | 70 | fibptr = aac_fib_alloc(dev); |
68 | if(fibptr == NULL) { | 71 | if(fibptr == NULL) { |
69 | return -ENOMEM; | 72 | return -ENOMEM; |
@@ -469,6 +472,10 @@ static int aac_send_raw_srb(struct aac_dev* dev, void __user * arg) | |||
469 | int i; | 472 | int i; |
470 | 473 | ||
471 | 474 | ||
475 | if (dev->in_reset) { | ||
476 | dprintk((KERN_DEBUG"aacraid: send raw srb -EBUSY\n")); | ||
477 | return -EBUSY; | ||
478 | } | ||
472 | if (!capable(CAP_SYS_ADMIN)){ | 479 | if (!capable(CAP_SYS_ADMIN)){ |
473 | dprintk((KERN_DEBUG"aacraid: No permission to send raw srb\n")); | 480 | dprintk((KERN_DEBUG"aacraid: No permission to send raw srb\n")); |
474 | return -EPERM; | 481 | return -EPERM; |