diff options
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) | |||
325 | { | 325 | { |
326 | u32 status[5]; | 326 | u32 status[5]; |
327 | struct Scsi_Host * host = dev->scsi_host_ptr; | 327 | struct Scsi_Host * host = dev->scsi_host_ptr; |
328 | extern int aac_sync_mode; | ||
328 | 329 | ||
329 | /* | 330 | /* |
330 | * Check the preferred comm settings, defaults from template. | 331 | * Check the preferred comm settings, defaults from template. |
331 | */ | 332 | */ |
332 | dev->management_fib_count = 0; | 333 | dev->management_fib_count = 0; |
333 | spin_lock_init(&dev->manage_lock); | 334 | spin_lock_init(&dev->manage_lock); |
335 | spin_lock_init(&dev->sync_lock); | ||
334 | dev->max_fib_size = sizeof(struct hw_fib); | 336 | dev->max_fib_size = sizeof(struct hw_fib); |
335 | dev->sg_tablesize = host->sg_tablesize = (dev->max_fib_size | 337 | dev->sg_tablesize = host->sg_tablesize = (dev->max_fib_size |
336 | - sizeof(struct aac_fibhdr) | 338 | - sizeof(struct aac_fibhdr) |
@@ -344,13 +346,21 @@ struct aac_dev *aac_init_adapter(struct aac_dev *dev) | |||
344 | (status[0] == 0x00000001)) { | 346 | (status[0] == 0x00000001)) { |
345 | if (status[1] & le32_to_cpu(AAC_OPT_NEW_COMM_64)) | 347 | if (status[1] & le32_to_cpu(AAC_OPT_NEW_COMM_64)) |
346 | dev->raw_io_64 = 1; | 348 | dev->raw_io_64 = 1; |
347 | if (dev->a_ops.adapter_comm) { | 349 | dev->sync_mode = aac_sync_mode; |
348 | if (status[1] & le32_to_cpu(AAC_OPT_NEW_COMM_TYPE1)) { | 350 | if (dev->a_ops.adapter_comm && |
349 | dev->comm_interface = AAC_COMM_MESSAGE_TYPE1; | 351 | (status[1] & le32_to_cpu(AAC_OPT_NEW_COMM))) { |
350 | dev->raw_io_interface = 1; | ||
351 | } else if (status[1] & le32_to_cpu(AAC_OPT_NEW_COMM)) { | ||
352 | dev->comm_interface = AAC_COMM_MESSAGE; | 352 | dev->comm_interface = AAC_COMM_MESSAGE; |
353 | dev->raw_io_interface = 1; | 353 | dev->raw_io_interface = 1; |
354 | if ((status[1] & le32_to_cpu(AAC_OPT_NEW_COMM_TYPE1))) { | ||
355 | /* driver supports TYPE1 (Tupelo) */ | ||
356 | dev->comm_interface = AAC_COMM_MESSAGE_TYPE1; | ||
357 | } else if ((status[1] & le32_to_cpu(AAC_OPT_NEW_COMM_TYPE4)) || | ||
358 | (status[1] & le32_to_cpu(AAC_OPT_NEW_COMM_TYPE3)) || | ||
359 | (status[1] & le32_to_cpu(AAC_OPT_NEW_COMM_TYPE2))) { | ||
360 | /* driver doesn't support TYPE2 (Series7), TYPE3 and TYPE4 */ | ||
361 | /* switch to sync. mode */ | ||
362 | dev->comm_interface = AAC_COMM_MESSAGE_TYPE1; | ||
363 | dev->sync_mode = 1; | ||
354 | } | 364 | } |
355 | } | 365 | } |
356 | if ((dev->comm_interface == AAC_COMM_MESSAGE) && | 366 | if ((dev->comm_interface == AAC_COMM_MESSAGE) && |
@@ -455,6 +465,7 @@ struct aac_dev *aac_init_adapter(struct aac_dev *dev) | |||
455 | } | 465 | } |
456 | 466 | ||
457 | INIT_LIST_HEAD(&dev->fib_list); | 467 | INIT_LIST_HEAD(&dev->fib_list); |
468 | INIT_LIST_HEAD(&dev->sync_fib_list); | ||
458 | 469 | ||
459 | return dev; | 470 | return dev; |
460 | } | 471 | } |