diff options
author | Mahesh Rajashekhara <Mahesh_Rajashekhara@pmc-sierra.com> | 2012-02-09 10:51:04 +0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2012-02-19 18:09:01 +0400 |
commit | 116046127d1a3bad2853d02781ad9fee33f05e5a (patch) | |
tree | f5a0ca20662b98960ce20587f666b6267367478b /drivers/scsi/aacraid/comminit.c | |
parent | 70fc872c738d1e0af7d0420047e4ca3acf283c9d (diff) | |
download | linux-116046127d1a3bad2853d02781ad9fee33f05e5a.tar.xz |
[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>
Diffstat (limited to 'drivers/scsi/aacraid/comminit.c')
-rw-r--r-- | drivers/scsi/aacraid/comminit.c | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/drivers/scsi/aacraid/comminit.c b/drivers/scsi/aacraid/comminit.c index 7ac8fdb5577b..a35f54ebdce0 100644 --- a/drivers/scsi/aacraid/comminit.c +++ b/drivers/scsi/aacraid/comminit.c @@ -325,12 +325,14 @@ struct aac_dev *aac_init_adapter(struct aac_dev *dev) { u32 status[5]; struct Scsi_Host * host = dev->scsi_host_ptr; + extern int aac_sync_mode; /* * Check the preferred comm settings, defaults from template. */ dev->management_fib_count = 0; spin_lock_init(&dev->manage_lock); + spin_lock_init(&dev->sync_lock); dev->max_fib_size = sizeof(struct hw_fib); dev->sg_tablesize = host->sg_tablesize = (dev->max_fib_size - sizeof(struct aac_fibhdr) @@ -344,13 +346,21 @@ struct aac_dev *aac_init_adapter(struct aac_dev *dev) (status[0] == 0x00000001)) { if (status[1] & le32_to_cpu(AAC_OPT_NEW_COMM_64)) dev->raw_io_64 = 1; - if (dev->a_ops.adapter_comm) { - if (status[1] & le32_to_cpu(AAC_OPT_NEW_COMM_TYPE1)) { - dev->comm_interface = AAC_COMM_MESSAGE_TYPE1; - dev->raw_io_interface = 1; - } else if (status[1] & le32_to_cpu(AAC_OPT_NEW_COMM)) { + dev->sync_mode = aac_sync_mode; + if (dev->a_ops.adapter_comm && + (status[1] & le32_to_cpu(AAC_OPT_NEW_COMM))) { dev->comm_interface = AAC_COMM_MESSAGE; dev->raw_io_interface = 1; + if ((status[1] & le32_to_cpu(AAC_OPT_NEW_COMM_TYPE1))) { + /* driver supports TYPE1 (Tupelo) */ + dev->comm_interface = AAC_COMM_MESSAGE_TYPE1; + } else if ((status[1] & le32_to_cpu(AAC_OPT_NEW_COMM_TYPE4)) || + (status[1] & le32_to_cpu(AAC_OPT_NEW_COMM_TYPE3)) || + (status[1] & le32_to_cpu(AAC_OPT_NEW_COMM_TYPE2))) { + /* driver doesn't support TYPE2 (Series7), TYPE3 and TYPE4 */ + /* switch to sync. mode */ + dev->comm_interface = AAC_COMM_MESSAGE_TYPE1; + dev->sync_mode = 1; } } if ((dev->comm_interface == AAC_COMM_MESSAGE) && @@ -455,6 +465,7 @@ struct aac_dev *aac_init_adapter(struct aac_dev *dev) } INIT_LIST_HEAD(&dev->fib_list); + INIT_LIST_HEAD(&dev->sync_fib_list); return dev; } |