diff options
Diffstat (limited to 'drivers/scsi/aacraid/comminit.c')
-rw-r--r-- | drivers/scsi/aacraid/comminit.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/scsi/aacraid/comminit.c b/drivers/scsi/aacraid/comminit.c index 6d305b2f854e..df67ba686023 100644 --- a/drivers/scsi/aacraid/comminit.c +++ b/drivers/scsi/aacraid/comminit.c | |||
@@ -95,7 +95,7 @@ static int aac_alloc_comm(struct aac_dev *dev, void **commaddr, unsigned long co | |||
95 | init->HostPhysMemPages = cpu_to_le32(AAC_MAX_HOSTPHYSMEMPAGES); | 95 | init->HostPhysMemPages = cpu_to_le32(AAC_MAX_HOSTPHYSMEMPAGES); |
96 | 96 | ||
97 | init->InitFlags = 0; | 97 | init->InitFlags = 0; |
98 | if (dev->new_comm_interface) { | 98 | if (dev->comm_interface == AAC_COMM_MESSAGE) { |
99 | init->InitFlags = cpu_to_le32(INITFLAGS_NEW_COMM_SUPPORTED); | 99 | init->InitFlags = cpu_to_le32(INITFLAGS_NEW_COMM_SUPPORTED); |
100 | dprintk((KERN_WARNING"aacraid: New Comm Interface enabled\n")); | 100 | dprintk((KERN_WARNING"aacraid: New Comm Interface enabled\n")); |
101 | } | 101 | } |
@@ -297,21 +297,23 @@ struct aac_dev *aac_init_adapter(struct aac_dev *dev) | |||
297 | - sizeof(struct aac_fibhdr) | 297 | - sizeof(struct aac_fibhdr) |
298 | - sizeof(struct aac_write) + sizeof(struct sgentry)) | 298 | - sizeof(struct aac_write) + sizeof(struct sgentry)) |
299 | / sizeof(struct sgentry); | 299 | / sizeof(struct sgentry); |
300 | dev->new_comm_interface = 0; | 300 | dev->comm_interface = AAC_COMM_PRODUCER; |
301 | dev->raw_io_64 = 0; | 301 | dev->raw_io_64 = 0; |
302 | if ((!aac_adapter_sync_cmd(dev, GET_ADAPTER_PROPERTIES, | 302 | if ((!aac_adapter_sync_cmd(dev, GET_ADAPTER_PROPERTIES, |
303 | 0, 0, 0, 0, 0, 0, status+0, status+1, status+2, NULL, NULL)) && | 303 | 0, 0, 0, 0, 0, 0, status+0, status+1, status+2, NULL, NULL)) && |
304 | (status[0] == 0x00000001)) { | 304 | (status[0] == 0x00000001)) { |
305 | if (status[1] & AAC_OPT_NEW_COMM_64) | 305 | if (status[1] & AAC_OPT_NEW_COMM_64) |
306 | dev->raw_io_64 = 1; | 306 | dev->raw_io_64 = 1; |
307 | if (status[1] & AAC_OPT_NEW_COMM) | 307 | if (dev->a_ops.adapter_comm && |
308 | dev->new_comm_interface = dev->a_ops.adapter_send != 0; | 308 | (status[1] & AAC_OPT_NEW_COMM)) |
309 | if (dev->new_comm_interface && (status[2] > dev->base_size)) { | 309 | dev->comm_interface = AAC_COMM_MESSAGE; |
310 | if ((dev->comm_interface == AAC_COMM_MESSAGE) && | ||
311 | (status[2] > dev->base_size)) { | ||
310 | aac_adapter_ioremap(dev, 0); | 312 | aac_adapter_ioremap(dev, 0); |
311 | dev->base_size = status[2]; | 313 | dev->base_size = status[2]; |
312 | if (aac_adapter_ioremap(dev, status[2])) { | 314 | if (aac_adapter_ioremap(dev, status[2])) { |
313 | /* remap failed, go back ... */ | 315 | /* remap failed, go back ... */ |
314 | dev->new_comm_interface = 0; | 316 | dev->comm_interface = AAC_COMM_PRODUCER; |
315 | if (aac_adapter_ioremap(dev, AAC_MIN_FOOTPRINT_SIZE)) { | 317 | if (aac_adapter_ioremap(dev, AAC_MIN_FOOTPRINT_SIZE)) { |
316 | printk(KERN_WARNING | 318 | printk(KERN_WARNING |
317 | "aacraid: unable to map adapter.\n"); | 319 | "aacraid: unable to map adapter.\n"); |