[SCSI] aacraid: interruptible ioctl
Received from Mark Salyzyn This patch allows the FSACTL_SEND_LARGE_FIB, FSACTL_SENDFIB and FSACTL_SEND_RAW_SRB ioctl calls into the aacraid driver to be interruptible. Only necessary if the adapter and/or the management software has gone into some sort of misbehavior and the system is being rebooted, thus permitting the user management software applications to be killed relatively cleanly. The FIB queue resource is held out of the free queue until the adapter finally, if ever, completes the command. Signed-off-by: Mark Haverkamp <markh@osdl.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
This commit is contained in:

committed by
James Bottomley

parent
04846f2592
commit
c8f7b073e0
@@ -124,10 +124,15 @@ unsigned int aac_response_normal(struct aac_queue * q)
|
||||
} else {
|
||||
unsigned long flagv;
|
||||
spin_lock_irqsave(&fib->event_lock, flagv);
|
||||
fib->done = 1;
|
||||
if (!fib->done)
|
||||
fib->done = 1;
|
||||
up(&fib->event_wait);
|
||||
spin_unlock_irqrestore(&fib->event_lock, flagv);
|
||||
FIB_COUNTER_INCREMENT(aac_config.NormalRecved);
|
||||
if (fib->done == 2) {
|
||||
aac_fib_complete(fib);
|
||||
aac_fib_free(fib);
|
||||
}
|
||||
}
|
||||
consumed++;
|
||||
spin_lock_irqsave(q->lock, flags);
|
||||
@@ -316,7 +321,8 @@ unsigned int aac_intr_normal(struct aac_dev * dev, u32 Index)
|
||||
unsigned long flagv;
|
||||
dprintk((KERN_INFO "event_wait up\n"));
|
||||
spin_lock_irqsave(&fib->event_lock, flagv);
|
||||
fib->done = 1;
|
||||
if (!fib->done)
|
||||
fib->done = 1;
|
||||
up(&fib->event_wait);
|
||||
spin_unlock_irqrestore(&fib->event_lock, flagv);
|
||||
FIB_COUNTER_INCREMENT(aac_config.NormalRecved);
|
||||
|
Reference in New Issue
Block a user