aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aacraid/comminit.c
diff options
context:
space:
mode:
authorMark Haverkamp <markh@osdl.org>2005-10-24 13:52:22 -0400
committerJames Bottomley <jejb@mulgrave.(none)>2005-10-28 12:41:53 -0400
commit8e0c5ebde82b08f6d996e11983890fc4cc085fab (patch)
tree3ba38ff8e7b9203b47d038c215d9c7d623c250ba /drivers/scsi/aacraid/comminit.c
parent38a9a621aba953ddb8051547e98c10ec3c741312 (diff)
[SCSI] aacraid: Newer adapter communication iterface support
Received from Mark Salyzyn. This patch adds the 'new comm' interface, which modern AAC based adapters that are less than a year old support in the name of much improved performance. These modern adapters support both the legacy and the 'new comm' interfaces. Signed-off-by: Mark Haverkamp <markh@osdl.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/aacraid/comminit.c')
-rw-r--r--drivers/scsi/aacraid/comminit.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/scsi/aacraid/comminit.c b/drivers/scsi/aacraid/comminit.c
index 59a341b2aedc..82821d331c07 100644
--- a/drivers/scsi/aacraid/comminit.c
+++ b/drivers/scsi/aacraid/comminit.c
@@ -116,6 +116,10 @@ static int aac_alloc_comm(struct aac_dev *dev, void **commaddr, unsigned long co
116 } 116 }
117 117
118 init->InitFlags = 0; 118 init->InitFlags = 0;
119 if (dev->new_comm_interface) {
120 init->InitFlags = cpu_to_le32(INITFLAGS_NEW_COMM_SUPPORTED);
121 dprintk((KERN_WARNING"aacraid: New Comm Interface enabled\n"));
122 }
119 init->MaxIoCommands = cpu_to_le32(dev->scsi_host_ptr->can_queue + AAC_NUM_MGT_FIB); 123 init->MaxIoCommands = cpu_to_le32(dev->scsi_host_ptr->can_queue + AAC_NUM_MGT_FIB);
120 init->MaxIoSize = cpu_to_le32(dev->scsi_host_ptr->max_sectors << 9); 124 init->MaxIoSize = cpu_to_le32(dev->scsi_host_ptr->max_sectors << 9);
121 init->MaxFibSize = cpu_to_le32(dev->max_fib_size); 125 init->MaxFibSize = cpu_to_le32(dev->max_fib_size);
@@ -315,12 +319,33 @@ struct aac_dev *aac_init_adapter(struct aac_dev *dev)
315 - sizeof(struct aac_fibhdr) 319 - sizeof(struct aac_fibhdr)
316 - sizeof(struct aac_write) + sizeof(struct sgentry)) 320 - sizeof(struct aac_write) + sizeof(struct sgentry))
317 / sizeof(struct sgentry); 321 / sizeof(struct sgentry);
322 dev->new_comm_interface = 0;
318 dev->raw_io_64 = 0; 323 dev->raw_io_64 = 0;
319 if ((!aac_adapter_sync_cmd(dev, GET_ADAPTER_PROPERTIES, 324 if ((!aac_adapter_sync_cmd(dev, GET_ADAPTER_PROPERTIES,
320 0, 0, 0, 0, 0, 0, status+0, status+1, status+2, NULL, NULL)) && 325 0, 0, 0, 0, 0, 0, status+0, status+1, status+2, NULL, NULL)) &&
321 (status[0] == 0x00000001)) { 326 (status[0] == 0x00000001)) {
322 if (status[1] & AAC_OPT_NEW_COMM_64) 327 if (status[1] & AAC_OPT_NEW_COMM_64)
323 dev->raw_io_64 = 1; 328 dev->raw_io_64 = 1;
329 if (status[1] & AAC_OPT_NEW_COMM)
330 dev->new_comm_interface = dev->a_ops.adapter_send != 0;
331 if (dev->new_comm_interface && (status[2] > dev->base_size)) {
332 iounmap(dev->regs.sa);
333 dev->base_size = status[2];
334 dprintk((KERN_DEBUG "ioremap(%lx,%d)\n",
335 host->base, status[2]));
336 dev->regs.sa = ioremap(host->base, status[2]);
337 if (dev->regs.sa == NULL) {
338 /* remap failed, go back ... */
339 dev->new_comm_interface = 0;
340 dev->regs.sa = ioremap(host->base,
341 AAC_MIN_FOOTPRINT_SIZE);
342 if (dev->regs.sa == NULL) {
343 printk(KERN_WARNING
344 "aacraid: unable to map adapter.\n");
345 return NULL;
346 }
347 }
348 }
324 } 349 }
325 if ((!aac_adapter_sync_cmd(dev, GET_COMM_PREFERRED_SETTINGS, 350 if ((!aac_adapter_sync_cmd(dev, GET_COMM_PREFERRED_SETTINGS,
326 0, 0, 0, 0, 0, 0, 351 0, 0, 0, 0, 0, 0,