[SCSI] aacraid: Added Sync.mode to support series 7/8/9 controllers
Added Sync. mode to support Series 7/8/9 controller families: This is a compatibility mode for all these controller families. The Async. (Performance) mode can be changed in the future. First Async. mode version added for Series 7; Controller parameter aac_sync_mode added Signed-off-by: Mahesh Rajashekhara <aacraid@pmc-sierra.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
This commit is contained in:

committed by
James Bottomley

parent
70fc872c73
commit
116046127d
@@ -416,6 +416,7 @@ int aac_fib_send(u16 command, struct fib *fibptr, unsigned long size,
|
||||
unsigned long flags = 0;
|
||||
unsigned long qflags;
|
||||
unsigned long mflags = 0;
|
||||
unsigned long sflags = 0;
|
||||
|
||||
|
||||
if (!(hw_fib->header.XferState & cpu_to_le32(HostOwned)))
|
||||
@@ -512,6 +513,31 @@ int aac_fib_send(u16 command, struct fib *fibptr, unsigned long size,
|
||||
spin_lock_irqsave(&fibptr->event_lock, flags);
|
||||
}
|
||||
|
||||
if (dev->sync_mode) {
|
||||
if (wait)
|
||||
spin_unlock_irqrestore(&fibptr->event_lock, flags);
|
||||
spin_lock_irqsave(&dev->sync_lock, sflags);
|
||||
if (dev->sync_fib) {
|
||||
list_add_tail(&fibptr->fiblink, &dev->sync_fib_list);
|
||||
spin_unlock_irqrestore(&dev->sync_lock, sflags);
|
||||
} else {
|
||||
dev->sync_fib = fibptr;
|
||||
spin_unlock_irqrestore(&dev->sync_lock, sflags);
|
||||
aac_adapter_sync_cmd(dev, SEND_SYNCHRONOUS_FIB,
|
||||
(u32)fibptr->hw_fib_pa, 0, 0, 0, 0, 0,
|
||||
NULL, NULL, NULL, NULL, NULL);
|
||||
}
|
||||
if (wait) {
|
||||
fibptr->flags |= FIB_CONTEXT_FLAG_WAIT;
|
||||
if (down_interruptible(&fibptr->event_wait)) {
|
||||
fibptr->flags &= ~FIB_CONTEXT_FLAG_WAIT;
|
||||
return -EFAULT;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
return -EINPROGRESS;
|
||||
}
|
||||
|
||||
if (aac_adapter_deliver(fibptr) != 0) {
|
||||
printk(KERN_ERR "aac_fib_send: returned -EBUSY\n");
|
||||
if (wait) {
|
||||
|
Reference in New Issue
Block a user