aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aacraid/linit.c
diff options
context:
space:
mode:
authorMark Haverkamp <markh@osdl.org>2006-02-01 12:30:44 -0500
committer <jejb@mulgrave.il.steeleye.com>2006-02-04 17:16:14 -0500
commitbb08f92ebd75704e07d69bb9d8ee234d1a500b98 (patch)
tree9756f6c6a18574264e889aa9af408ce60ca59fbb /drivers/scsi/aacraid/linit.c
parentbfb35aa85057da4336af56a7f26e08031f4e3468 (diff)
[SCSI] aacraid: use no_uld_attach flag
Received From Mark Salyzyn. In order to support user tools accessing the array components (SMART, Mode Page information, Cache page adjustments, WWN determination, Firmware updates etc), we take advantage of the no_uld_attach flag and deprecate the code that filters Inquiries to block the requests to array components. The quirk prevents the sd layer from attaching to the components. We also took the opportunity to balance the queue depths based on the total adapter queue depth to the array devices to reduce the chances of starvation. Signed-off-by: Mark Haverkamp <markh@osdl.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/aacraid/linit.c')
-rw-r--r--drivers/scsi/aacraid/linit.c42
1 files changed, 33 insertions, 9 deletions
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
index 9defee03b823..271617890562 100644
--- a/drivers/scsi/aacraid/linit.c
+++ b/drivers/scsi/aacraid/linit.c
@@ -385,21 +385,45 @@ static int aac_biosparm(struct scsi_device *sdev, struct block_device *bdev,
385 385
386static int aac_slave_configure(struct scsi_device *sdev) 386static int aac_slave_configure(struct scsi_device *sdev)
387{ 387{
388 struct Scsi_Host *host = sdev->host;
389 if (sdev_channel(sdev) == CONTAINER_CHANNEL) { 388 if (sdev_channel(sdev) == CONTAINER_CHANNEL) {
390 sdev->skip_ms_page_8 = 1; 389 sdev->skip_ms_page_8 = 1;
391 sdev->skip_ms_page_3f = 1; 390 sdev->skip_ms_page_3f = 1;
392 } 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;
393 405
394 if (sdev->tagged_supported) 406 __shost_for_each_device(dev, host) {
395 scsi_adjust_queue_depth(sdev, MSG_ORDERED_TAG, 128); 407 if (dev->tagged_supported && (dev->type == TYPE_DISK) &&
396 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
397 scsi_adjust_queue_depth(sdev, 0, 1); 425 scsi_adjust_queue_depth(sdev, 0, 1);
398 426
399 if (!(((struct aac_dev *)host->hostdata)->adapter_info.options
400 & AAC_OPT_NEW_COMM))
401 blk_queue_max_segment_size(sdev->request_queue, 65536);
402
403 return 0; 427 return 0;
404} 428}
405 429
@@ -874,7 +898,7 @@ static int __devinit aac_probe_one(struct pci_dev *pdev,
874 898
875 /* 899 /*
876 * max channel will be the physical channels plus 1 virtual channel 900 * max channel will be the physical channels plus 1 virtual channel
877 * all containers are on the virtual channel 0 901 * all containers are on the virtual channel 0 (CONTAINER_CHANNEL)
878 * physical channels are address by their actual physical number+1 902 * physical channels are address by their actual physical number+1
879 */ 903 */
880 if (aac->nondasd_support == 1) 904 if (aac->nondasd_support == 1)