Commit 536cba88 authored by James Bottomley's avatar James Bottomley Committed by James Bottomley

scsi: add blacklist attribute indicating no ULD attach

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: default avatarJames Bottomley <James.Bottomley@SteelEye.com>
parent 93d9161d
......@@ -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 */
......
......@@ -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:
......
......@@ -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;
}
......
......@@ -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. */
......
......@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment