]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/scsi/aacraid/linit.c
[SCSI] remove use_sg_chaining
[linux-2.6-omap-h63xx.git] / drivers / scsi / aacraid / linit.c
index 6650f6fa989056a547eee75cc0ee9bb5daccbbdc..0e8267c1e9155a29df404823454a47268442a667 100644 (file)
@@ -404,6 +404,7 @@ static int aac_slave_configure(struct scsi_device *sdev)
        struct aac_dev *aac = (struct aac_dev *)sdev->host->hostdata;
        if ((sdev->type == TYPE_DISK) &&
                        (sdev_channel(sdev) != CONTAINER_CHANNEL) &&
+                       (!aac->jbod || sdev->inq_periph_qual) &&
                        (!aac->raid_scsi_mode || (sdev_channel(sdev) != 2))) {
                if (expose_physicals == 0)
                        return -ENXIO;
@@ -411,7 +412,8 @@ static int aac_slave_configure(struct scsi_device *sdev)
                        sdev->no_uld_attach = 1;
        }
        if (sdev->tagged_supported && (sdev->type == TYPE_DISK) &&
-                       (sdev_channel(sdev) == CONTAINER_CHANNEL)) {
+                       (!aac->raid_scsi_mode || (sdev_channel(sdev) != 2)) &&
+                       !sdev->no_uld_attach) {
                struct scsi_device * dev;
                struct Scsi_Host *host = sdev->host;
                unsigned num_lsu = 0;
@@ -430,8 +432,11 @@ static int aac_slave_configure(struct scsi_device *sdev)
                                ++num_lsu;
                __shost_for_each_device(dev, host) {
                        if (dev->tagged_supported && (dev->type == TYPE_DISK) &&
-                               (sdev_channel(dev) == CONTAINER_CHANNEL)) {
-                               if (!aac->fsa_dev[sdev_id(dev)].valid)
+                                       (!aac->raid_scsi_mode ||
+                                               (sdev_channel(sdev) != 2)) &&
+                                       !dev->no_uld_attach) {
+                               if ((sdev_channel(dev) != CONTAINER_CHANNEL)
+                                || !aac->fsa_dev[sdev_id(dev)].valid)
                                        ++num_lsu;
                        } else
                                ++num_one;
@@ -790,6 +795,25 @@ static ssize_t aac_show_vendor(struct class_device *class_dev,
        return len;
 }
 
+static ssize_t aac_show_flags(struct class_device *class_dev, char *buf)
+{
+       int len = 0;
+       struct aac_dev *dev = (struct aac_dev*)class_to_shost(class_dev)->hostdata;
+
+       if (nblank(dprintk(x)))
+               len = snprintf(buf, PAGE_SIZE, "dprintk\n");
+#ifdef AAC_DETAILED_STATUS_INFO
+       len += snprintf(buf + len, PAGE_SIZE - len,
+                       "AAC_DETAILED_STATUS_INFO\n");
+#endif
+       if (dev->raw_io_interface && dev->raw_io_64)
+               len += snprintf(buf + len, PAGE_SIZE - len,
+                               "SAI_READ_CAPACITY_16\n");
+       if (dev->jbod)
+               len += snprintf(buf + len, PAGE_SIZE - len, "SUPPORTED_JBOD\n");
+       return len;
+}
+
 static ssize_t aac_show_kernel_version(struct class_device *class_dev,
                char *buf)
 {
@@ -899,6 +923,13 @@ static struct class_device_attribute aac_vendor = {
        },
        .show = aac_show_vendor,
 };
+static struct class_device_attribute aac_flags = {
+       .attr = {
+               .name = "flags",
+               .mode = S_IRUGO,
+       },
+       .show = aac_show_flags,
+};
 static struct class_device_attribute aac_kernel_version = {
        .attr = {
                .name = "hba_kernel_version",
@@ -953,6 +984,7 @@ static struct class_device_attribute aac_reset = {
 static struct class_device_attribute *aac_attrs[] = {
        &aac_model,
        &aac_vendor,
+       &aac_flags,
        &aac_kernel_version,
        &aac_monitor_version,
        &aac_bios_version,
@@ -1000,7 +1032,6 @@ static struct scsi_host_template aac_driver_template = {
        .cmd_per_lun                    = AAC_NUM_IO_FIB,
 #endif
        .use_clustering                 = ENABLE_CLUSTERING,
-       .use_sg_chaining                = ENABLE_SG_CHAINING,
        .emulated                       = 1,
 };
 
@@ -1132,7 +1163,7 @@ static int __devinit aac_probe_one(struct pci_dev *pdev,
         * all containers are on the virtual channel 0 (CONTAINER_CHANNEL)
         * physical channels are address by their actual physical number+1
         */
-       if ((aac->nondasd_support == 1) || expose_physicals)
+       if (aac->nondasd_support || expose_physicals || aac->jbod)
                shost->max_channel = aac->maximum_num_channels;
        else
                shost->max_channel = 0;