]> git.hungrycats.org Git - linux/commitdiff
scsi: add blacklist attribute indicating no ULD attach
authorJames Bottomley <jejb@mulgrave.(none)>
Thu, 16 Sep 2004 11:06:32 +0000 (07:06 -0400)
committerJames Bottomley <jejb@gsyprf11.external.hp.com>
Thu, 16 Sep 2004 11:06:32 +0000 (07:06 -0400)
From: Jeremy Higdon <jeremy@sgi.com>

Add blacklist attribute to disable ULD attachment to a lun, and use
that attribute for SGI-branded Engenio UTM luns.

Minor rejection fixes and
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/scsi_devinfo.c
drivers/scsi/scsi_scan.c
drivers/scsi/scsi_sysfs.c
include/scsi/scsi_device.h
include/scsi/scsi_devinfo.h

index fa28b3a9c12dbb9fb6fb6e4cb16f372714af0227..0b3759baf02cd41727e28bc31e9b55e7c2ba68fd 100644 (file)
@@ -185,6 +185,7 @@ static struct {
        {"SGI", "RAID3", "*", BLIST_SPARSELUN},
        {"SGI", "RAID5", "*", BLIST_SPARSELUN},
        {"SGI", "TP9100", "*", BLIST_REPORTLUN2},
+       {"SGI", "Universal Xport", "*", BLIST_NO_ULD_ATTACH},
        {"SMSC", "USB 2 HS-CF", NULL, BLIST_SPARSELUN | BLIST_INQUIRY_36},
        {"SONY", "CD-ROM CDU-8001", NULL, BLIST_BORKEN},
        {"SONY", "TSL", NULL, BLIST_FORCELUN},          /* DDS3 & DDS4 autoloaders */
index 9d4d3ce9e92e86c54b020e67a1d497d198d12631..4ad924dbb110a5b3c312e32a1a87bacbe78c8aa8 100644 (file)
@@ -533,7 +533,8 @@ static int scsi_add_lun(struct scsi_device *sdev, char *inq_result, int *bflags)
                 */
                inq_result[0] = TYPE_ROM;
                inq_result[1] |= 0x80;  /* removable */
-       }
+       } else if (*bflags & BLIST_NO_ULD_ATTACH)
+               sdev->no_uld_attach = 1;
 
        switch (sdev->type = (inq_result[0] & 0x1f)) {
        case TYPE_TAPE:
index 3c567e1446aad2339419316f91beca5f6eb450c0..e11b4b13fdefa7d19f6ed0bacd7f31c32ef03051 100644 (file)
@@ -183,6 +183,8 @@ struct class sdev_class = {
 static int scsi_bus_match(struct device *dev, struct device_driver *gendrv)
 {
        struct scsi_device *sdp = to_scsi_device(dev);
+       if (sdp->no_uld_attach)
+               return 0;
        return (sdp->inq_periph_qual == SCSI_INQ_PQ_CON)? 1: 0;
 }
 
index e76510c345c4112038283ae914d6713a40c2392a..67abe3055ea525d7c2a06b0695a8606717fef3bf 100644 (file)
@@ -106,6 +106,7 @@ struct scsi_device {
        unsigned use_192_bytes_for_3f:1; /* ask for 192 bytes from page 0x3f */
        unsigned no_start_on_add:1;     /* do not issue start on add */
        unsigned allow_restart:1; /* issue START_UNIT in error handler */
+       unsigned no_uld_attach:1; /* disable connecting to upper level drivers */
 
        unsigned int device_blocked;    /* Device returned QUEUE_FULL. */
 
index edf56685b2996cc54e96e2dea1ca98f86a720254..e6fa2131da4534da8ca7facb14dc6327dd3c90c2 100644 (file)
@@ -25,4 +25,5 @@
                                           (if HBA supports more than 8 LUNs) */
 #define BLIST_NOREPORTLUN      0x40000 /* don't try REPORT_LUNS scan (SCSI-3 devs) */
 #define BLIST_NOT_LOCKABLE     0x80000 /* don't use PREVENT-ALLOW commands */
+#define BLIST_NO_ULD_ATTACH    0x100000 /* device is actually for RAID config */
 #endif