diff options
Diffstat (limited to 'drivers/scsi/aacraid/linit.c')
| -rw-r--r-- | drivers/scsi/aacraid/linit.c | 50 |
1 files changed, 39 insertions, 11 deletions
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index 0bf5f9a943e8..271617890562 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c | |||
| @@ -385,17 +385,45 @@ static int aac_biosparm(struct scsi_device *sdev, struct block_device *bdev, | |||
| 385 | 385 | ||
| 386 | static int aac_slave_configure(struct scsi_device *sdev) | 386 | static int aac_slave_configure(struct scsi_device *sdev) |
| 387 | { | 387 | { |
| 388 | struct Scsi_Host *host = sdev->host; | 388 | if (sdev_channel(sdev) == CONTAINER_CHANNEL) { |
| 389 | sdev->skip_ms_page_8 = 1; | ||
| 390 | sdev->skip_ms_page_3f = 1; | ||
| 391 | } | ||
| 392 | if ((sdev->type == TYPE_DISK) && | ||
| 393 | (sdev_channel(sdev) != CONTAINER_CHANNEL)) { | ||
| 394 | struct aac_dev *aac = (struct aac_dev *)sdev->host->hostdata; | ||
| 395 | if (!aac->raid_scsi_mode || (sdev_channel(sdev) != 2)) | ||
| 396 | sdev->no_uld_attach = 1; | ||
| 397 | } | ||
| 398 | if (sdev->tagged_supported && (sdev->type == TYPE_DISK) && | ||
| 399 | (sdev_channel(sdev) == CONTAINER_CHANNEL)) { | ||
| 400 | struct scsi_device * dev; | ||
| 401 | struct Scsi_Host *host = sdev->host; | ||
| 402 | unsigned num_lsu = 0; | ||
| 403 | unsigned num_one = 0; | ||
| 404 | unsigned depth; | ||
| 389 | 405 | ||
| 390 | if (sdev->tagged_supported) | 406 | __shost_for_each_device(dev, host) { |
| 391 | scsi_adjust_queue_depth(sdev, MSG_ORDERED_TAG, 128); | 407 | if (dev->tagged_supported && (dev->type == TYPE_DISK) && |
| 392 | else | 408 | (sdev_channel(dev) == CONTAINER_CHANNEL)) |
| 409 | ++num_lsu; | ||
| 410 | else | ||
| 411 | ++num_one; | ||
| 412 | } | ||
| 413 | if (num_lsu == 0) | ||
| 414 | ++num_lsu; | ||
| 415 | depth = (host->can_queue - num_one) / num_lsu; | ||
| 416 | if (depth > 256) | ||
| 417 | depth = 256; | ||
| 418 | else if (depth < 2) | ||
| 419 | depth = 2; | ||
| 420 | scsi_adjust_queue_depth(sdev, MSG_ORDERED_TAG, depth); | ||
| 421 | if (!(((struct aac_dev *)host->hostdata)->adapter_info.options & | ||
| 422 | AAC_OPT_NEW_COMM)) | ||
| 423 | blk_queue_max_segment_size(sdev->request_queue, 65536); | ||
| 424 | } else | ||
| 393 | scsi_adjust_queue_depth(sdev, 0, 1); | 425 | scsi_adjust_queue_depth(sdev, 0, 1); |
| 394 | 426 | ||
| 395 | if (!(((struct aac_dev *)host->hostdata)->adapter_info.options | ||
| 396 | & AAC_OPT_NEW_COMM)) | ||
| 397 | blk_queue_max_segment_size(sdev->request_queue, 65536); | ||
| 398 | |||
| 399 | return 0; | 427 | return 0; |
| 400 | } | 428 | } |
| 401 | 429 | ||
| @@ -870,7 +898,7 @@ static int __devinit aac_probe_one(struct pci_dev *pdev, | |||
| 870 | 898 | ||
| 871 | /* | 899 | /* |
| 872 | * max channel will be the physical channels plus 1 virtual channel | 900 | * max channel will be the physical channels plus 1 virtual channel |
| 873 | * all containers are on the virtual channel 0 | 901 | * all containers are on the virtual channel 0 (CONTAINER_CHANNEL) |
| 874 | * physical channels are address by their actual physical number+1 | 902 | * physical channels are address by their actual physical number+1 |
| 875 | */ | 903 | */ |
| 876 | if (aac->nondasd_support == 1) | 904 | if (aac->nondasd_support == 1) |
| @@ -913,7 +941,7 @@ static int __devinit aac_probe_one(struct pci_dev *pdev, | |||
| 913 | aac_adapter_disable_int(aac); | 941 | aac_adapter_disable_int(aac); |
| 914 | free_irq(pdev->irq, aac); | 942 | free_irq(pdev->irq, aac); |
| 915 | out_unmap: | 943 | out_unmap: |
| 916 | fib_map_free(aac); | 944 | aac_fib_map_free(aac); |
| 917 | pci_free_consistent(aac->pdev, aac->comm_size, aac->comm_addr, aac->comm_phys); | 945 | pci_free_consistent(aac->pdev, aac->comm_size, aac->comm_addr, aac->comm_phys); |
| 918 | kfree(aac->queues); | 946 | kfree(aac->queues); |
| 919 | iounmap(aac->regs.sa); | 947 | iounmap(aac->regs.sa); |
| @@ -947,7 +975,7 @@ static void __devexit aac_remove_one(struct pci_dev *pdev) | |||
| 947 | 975 | ||
| 948 | aac_send_shutdown(aac); | 976 | aac_send_shutdown(aac); |
| 949 | aac_adapter_disable_int(aac); | 977 | aac_adapter_disable_int(aac); |
| 950 | fib_map_free(aac); | 978 | aac_fib_map_free(aac); |
| 951 | pci_free_consistent(aac->pdev, aac->comm_size, aac->comm_addr, | 979 | pci_free_consistent(aac->pdev, aac->comm_size, aac->comm_addr, |
| 952 | aac->comm_phys); | 980 | aac->comm_phys); |
| 953 | kfree(aac->queues); | 981 | kfree(aac->queues); |
