aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aacraid/linit.c
diff options
context:
space:
mode:
authorSalyzyn, Mark <Mark_Salyzyn@adaptec.com>2008-01-17 12:25:07 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-01-23 12:29:34 -0500
commitcb1042f285c2168bd8cf10aca0e24802e682252b (patch)
tree80b682f3fc0622de08278e37e51c59f94ad530e0 /drivers/scsi/aacraid/linit.c
parent2ca39c48ea0d2fd265479d0b62f2ac8878900360 (diff)
[SCSI] aacraid: add Voodoo Lite class of cards.
The cards being added are supported in a limited sense already through family matching, but we needed to add some functionality to the driver to expose selectively the physical drives. These Physical drives are specifically marked to not be part of any array and thus are declared JBODs (Just a Bunch Of Drives) for generic SCSI access. We report that this is the second patch in a set of two, but merely depends on the stand-alone functionality of the first patch which adds in that case the ability to report a driver feature flag via sysfs. We leverage that functionality by reporting that this driver now supports this new JBOD feature for the controller so that the array management applications may react accordingly and guide the user as they manage the controller. Signed-off-by: Mark Salyzyn <aacraid@adaptec.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/aacraid/linit.c')
-rw-r--r--drivers/scsi/aacraid/linit.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
index 5ab733d4faf4..61be22774e99 100644
--- a/drivers/scsi/aacraid/linit.c
+++ b/drivers/scsi/aacraid/linit.c
@@ -404,6 +404,7 @@ static int aac_slave_configure(struct scsi_device *sdev)
404 struct aac_dev *aac = (struct aac_dev *)sdev->host->hostdata; 404 struct aac_dev *aac = (struct aac_dev *)sdev->host->hostdata;
405 if ((sdev->type == TYPE_DISK) && 405 if ((sdev->type == TYPE_DISK) &&
406 (sdev_channel(sdev) != CONTAINER_CHANNEL) && 406 (sdev_channel(sdev) != CONTAINER_CHANNEL) &&
407 (!aac->jbod || sdev->inq_periph_qual) &&
407 (!aac->raid_scsi_mode || (sdev_channel(sdev) != 2))) { 408 (!aac->raid_scsi_mode || (sdev_channel(sdev) != 2))) {
408 if (expose_physicals == 0) 409 if (expose_physicals == 0)
409 return -ENXIO; 410 return -ENXIO;
@@ -411,7 +412,8 @@ static int aac_slave_configure(struct scsi_device *sdev)
411 sdev->no_uld_attach = 1; 412 sdev->no_uld_attach = 1;
412 } 413 }
413 if (sdev->tagged_supported && (sdev->type == TYPE_DISK) && 414 if (sdev->tagged_supported && (sdev->type == TYPE_DISK) &&
414 (sdev_channel(sdev) == CONTAINER_CHANNEL)) { 415 (!aac->raid_scsi_mode || (sdev_channel(sdev) != 2)) &&
416 !sdev->no_uld_attach) {
415 struct scsi_device * dev; 417 struct scsi_device * dev;
416 struct Scsi_Host *host = sdev->host; 418 struct Scsi_Host *host = sdev->host;
417 unsigned num_lsu = 0; 419 unsigned num_lsu = 0;
@@ -430,8 +432,11 @@ static int aac_slave_configure(struct scsi_device *sdev)
430 ++num_lsu; 432 ++num_lsu;
431 __shost_for_each_device(dev, host) { 433 __shost_for_each_device(dev, host) {
432 if (dev->tagged_supported && (dev->type == TYPE_DISK) && 434 if (dev->tagged_supported && (dev->type == TYPE_DISK) &&
433 (sdev_channel(dev) == CONTAINER_CHANNEL)) { 435 (!aac->raid_scsi_mode ||
434 if (!aac->fsa_dev[sdev_id(dev)].valid) 436 (sdev_channel(sdev) != 2)) &&
437 !dev->no_uld_attach) {
438 if ((sdev_channel(dev) != CONTAINER_CHANNEL)
439 || !aac->fsa_dev[sdev_id(dev)].valid)
435 ++num_lsu; 440 ++num_lsu;
436 } else 441 } else
437 ++num_one; 442 ++num_one;
@@ -804,6 +809,8 @@ static ssize_t aac_show_flags(struct class_device *class_dev, char *buf)
804 if (dev->raw_io_interface && dev->raw_io_64) 809 if (dev->raw_io_interface && dev->raw_io_64)
805 len += snprintf(buf + len, PAGE_SIZE - len, 810 len += snprintf(buf + len, PAGE_SIZE - len,
806 "SAI_READ_CAPACITY_16\n"); 811 "SAI_READ_CAPACITY_16\n");
812 if (dev->jbod)
813 len += snprintf(buf + len, PAGE_SIZE - len, "SUPPORTED_JBOD\n");
807 return len; 814 return len;
808} 815}
809 816
@@ -1157,7 +1164,7 @@ static int __devinit aac_probe_one(struct pci_dev *pdev,
1157 * all containers are on the virtual channel 0 (CONTAINER_CHANNEL) 1164 * all containers are on the virtual channel 0 (CONTAINER_CHANNEL)
1158 * physical channels are address by their actual physical number+1 1165 * physical channels are address by their actual physical number+1
1159 */ 1166 */
1160 if ((aac->nondasd_support == 1) || expose_physicals) 1167 if (aac->nondasd_support || expose_physicals || aac->jbod)
1161 shost->max_channel = aac->maximum_num_channels; 1168 shost->max_channel = aac->maximum_num_channels;
1162 else 1169 else
1163 shost->max_channel = 0; 1170 shost->max_channel = 0;