patch-2.4.19 linux-2.4.19/drivers/scsi/scsi_scan.c
Next file: linux-2.4.19/drivers/scsi/scsi_syms.c
Previous file: linux-2.4.19/drivers/scsi/scsi_obsolete.c
Back to the patch index
Back to the overall index
- Lines: 138
- Date:
Fri Aug 2 17:39:44 2002
- Orig file:
linux-2.4.18/drivers/scsi/scsi_scan.c
- Orig date:
Mon Feb 25 11:38:04 2002
diff -urN linux-2.4.18/drivers/scsi/scsi_scan.c linux-2.4.19/drivers/scsi/scsi_scan.c
@@ -23,21 +23,20 @@
#include <linux/kmod.h>
#endif
-/* The following devices are known not to tolerate a lun != 0 scan for
- * one reason or another. Some will respond to all luns, others will
- * lock up.
+/*
+ * Flags for irregular SCSI devices that need special treatment
*/
-
-#define BLIST_NOLUN 0x001
-#define BLIST_FORCELUN 0x002
-#define BLIST_BORKEN 0x004
-#define BLIST_KEY 0x008
-#define BLIST_SINGLELUN 0x010
-#define BLIST_NOTQ 0x020
-#define BLIST_SPARSELUN 0x040
-#define BLIST_MAX5LUN 0x080
-#define BLIST_ISDISK 0x100
-#define BLIST_ISROM 0x200
+#define BLIST_NOLUN 0x001 /* Don't scan for LUNs */
+#define BLIST_FORCELUN 0x002 /* Known to have LUNs, force sanning */
+#define BLIST_BORKEN 0x004 /* Flag for broken handshaking */
+#define BLIST_KEY 0x008 /* Needs to be unlocked by special command */
+#define BLIST_SINGLELUN 0x010 /* LUNs should better not be used in parallel */
+#define BLIST_NOTQ 0x020 /* Buggy Tagged Command Queuing */
+#define BLIST_SPARSELUN 0x040 /* Non consecutive LUN numbering */
+#define BLIST_MAX5LUN 0x080 /* Avoid LUNS >= 5 */
+#define BLIST_ISDISK 0x100 /* Treat as (removable) disk */
+#define BLIST_ISROM 0x200 /* Treat as (removable) CD-ROM */
+#define BLIST_LARGELUN 0x400 /* LUNs larger than 7 despite reporting as SCSI 2 */
static void print_inquiry(unsigned char *data);
static int scan_scsis_single(unsigned int channel, unsigned int dev,
@@ -62,6 +61,10 @@
*/
static struct dev_info device_list[] =
{
+/* The following devices are known not to tolerate a lun != 0 scan for
+ * one reason or another. Some will respond to all luns, others will
+ * lock up.
+ */
{"Aashima", "IMAGERY 2400SP", "1.03", BLIST_NOLUN}, /* Locks up if polled for lun != 0 */
{"CHINON", "CD-ROM CDS-431", "H42", BLIST_NOLUN}, /* Locks up if polled for lun != 0 */
{"CHINON", "CD-ROM CDS-535", "Q14", BLIST_NOLUN}, /* Locks up if polled for lun != 0 */
@@ -75,7 +78,6 @@
{"MAXTOR", "XT-4170S", "B5A", BLIST_NOLUN}, /* Locks-up sometimes when LUN>0 polled. */
{"MAXTOR", "XT-8760S", "B7B", BLIST_NOLUN}, /* guess what? */
{"MEDIAVIS", "RENO CD-ROMX2A", "2.03", BLIST_NOLUN}, /*Responds to all lun */
- {"MICROP", "4110", "*", BLIST_NOTQ}, /* Buggy Tagged Queuing */
{"NEC", "CD-ROM DRIVE:841", "1.0", BLIST_NOLUN}, /* Locks-up when LUN>0 polled. */
{"PHILIPS", "PCA80SC", "V4-2", BLIST_NOLUN}, /* Responds to all lun */
{"RODIME", "RO3000S", "2.33", BLIST_NOLUN}, /* Locks up if polled for lun != 0 */
@@ -108,6 +110,10 @@
{"HP", "C1750A", "3226", BLIST_NOLUN}, /* scanjet iic */
{"HP", "C1790A", "", BLIST_NOLUN}, /* scanjet iip */
{"HP", "C2500A", "", BLIST_NOLUN}, /* scanjet iicx */
+ {"HP", "A6188A", "*", BLIST_SPARSELUN}, /* HP Va7100 Array */
+ {"HP", "A6189A", "*", BLIST_SPARSELUN}, /* HP Va7400 Array */
+ {"HP", "A6189B", "*", BLIST_SPARSELUN}, /* HP Va7410 Array */
+ {"HP", "OPEN-", "*", BLIST_SPARSELUN}, /* HP XP Arrays */
{"YAMAHA", "CDR100", "1.00", BLIST_NOLUN}, /* Locks up if polled for lun != 0 */
{"YAMAHA", "CDR102", "1.00", BLIST_NOLUN}, /* Locks up if polled for lun != 0
* extra reset */
@@ -115,6 +121,8 @@
{"YAMAHA", "CRW6416S", "1.0c", BLIST_NOLUN}, /* Locks up if polled for lun != 0 */
{"MITSUMI", "CD-R CR-2201CS", "6119", BLIST_NOLUN}, /* Locks up if polled for lun != 0 */
{"RELISYS", "Scorpio", "*", BLIST_NOLUN}, /* responds to all LUN */
+ {"RELISYS", "VM3530+", "*", BLIST_NOLUN}, /* responds to all LUN */
+ {"ACROSS", "", "*", BLIST_NOLUN}, /* responds to all LUN */
{"MICROTEK", "ScanMaker II", "5.61", BLIST_NOLUN}, /* responds to all LUN */
/*
@@ -126,6 +134,7 @@
{"INSITE", "Floptical F*8I", "*", BLIST_KEY},
{"INSITE", "I325VM", "*", BLIST_KEY},
{"LASOUND","CDX7405","3.10", BLIST_MAX5LUN | BLIST_SINGLELUN},
+ {"MICROP", "4110", "*", BLIST_NOTQ}, /* Buggy Tagged Queuing */
{"NRC", "MBR-7", "*", BLIST_FORCELUN | BLIST_SINGLELUN},
{"NRC", "MBR-7.4", "*", BLIST_FORCELUN | BLIST_SINGLELUN},
{"REGAL", "CDC-4X", "*", BLIST_MAX5LUN | BLIST_SINGLELUN},
@@ -146,15 +155,16 @@
{"TOSHIBA","CDROM","*", BLIST_ISROM},
{"TOSHIBA","CD-ROM","*", BLIST_ISROM},
{"MegaRAID", "LD", "*", BLIST_FORCELUN},
- {"DGC", "RAID", "*", BLIST_SPARSELUN}, // Dell PV 650F (tgt @ LUN 0)
- {"DGC", "DISK", "*", BLIST_SPARSELUN}, // Dell PV 650F (no tgt @ LUN 0)
- {"DELL", "PV660F", "*", BLIST_SPARSELUN},
- {"DELL", "PV660F PSEUDO", "*", BLIST_SPARSELUN},
- {"DELL", "PSEUDO DEVICE .", "*", BLIST_SPARSELUN}, // Dell PV 530F
- {"DELL", "PV530F", "*", BLIST_SPARSELUN}, // Dell PV 530F
- {"EMC", "SYMMETRIX", "*", BLIST_SPARSELUN},
- {"CMD", "CRA-7280", "*", BLIST_SPARSELUN}, // CMD RAID Controller
- {"CNSI", "G7324", "*", BLIST_SPARSELUN}, // Chaparral G7324 RAID
+ {"DGC", "RAID", "*", BLIST_SPARSELUN | BLIST_LARGELUN}, // Dell PV 650F (tgt @ LUN 0)
+ {"DGC", "DISK", "*", BLIST_SPARSELUN | BLIST_LARGELUN}, // Dell PV 650F (no tgt @ LUN 0)
+ {"DELL", "PV660F", "*", BLIST_SPARSELUN | BLIST_LARGELUN},
+ {"DELL", "PV660F PSEUDO", "*", BLIST_SPARSELUN | BLIST_LARGELUN},
+ {"DELL", "PSEUDO DEVICE .", "*", BLIST_SPARSELUN | BLIST_LARGELUN}, // Dell PV 530F
+ {"DELL", "PV530F", "*", BLIST_SPARSELUN | BLIST_LARGELUN}, // Dell PV 530F
+ {"EMC", "SYMMETRIX", "*", BLIST_SPARSELUN | BLIST_LARGELUN | BLIST_FORCELUN},
+ {"HP", "A6189A", "*", BLIST_SPARSELUN | BLIST_LARGELUN}, // HP VA7400, by Alar Aun
+ {"CMD", "CRA-7280", "*", BLIST_SPARSELUN | BLIST_LARGELUN}, // CMD RAID Controller
+ {"CNSI", "G7324", "*", BLIST_SPARSELUN | BLIST_LARGELUN}, // Chaparral G7324 RAID
{"CNSi", "G8324", "*", BLIST_SPARSELUN}, // Chaparral G8324 RAID
{"Zzyzx", "RocketStor 500S", "*", BLIST_SPARSELUN},
{"Zzyzx", "RocketStor 2000", "*", BLIST_SPARSELUN},
@@ -164,6 +174,13 @@
{"ADAPTEC", "AACRAID", "*", BLIST_FORCELUN},
{"ADAPTEC", "Adaptec 5400S", "*", BLIST_FORCELUN},
{"COMPAQ", "MSA1000", "*", BLIST_FORCELUN},
+ {"HP", "C1557A", "*", BLIST_FORCELUN},
+ {"IBM", "AuSaV1S2", "*", BLIST_FORCELUN},
+ {"FSC", "CentricStor", "*", BLIST_SPARSELUN | BLIST_LARGELUN},
+ {"DDN", "SAN DataDirector", "*", BLIST_SPARSELUN},
+ {"HITACHI", "DF400", "*", BLIST_SPARSELUN},
+ {"HITACHI", "DF500", "*", BLIST_SPARSELUN},
+ {"HITACHI", "DF600", "*", BLIST_SPARSELUN},
/*
* Must be at end of list...
@@ -434,8 +451,13 @@
scsi_result)
&& !sparse_lun)
break; /* break means don't probe further for luns!=0 */
- if (SDpnt && (0 == lun))
- lun0_sl = SDpnt->scsi_level;
+ if (SDpnt && (0 == lun)) {
+ int bflags = get_device_flags (scsi_result);
+ if (bflags & BLIST_LARGELUN)
+ lun0_sl = SCSI_3; /* treat as SCSI 3 */
+ else
+ lun0_sl = SDpnt->scsi_level;
+ }
} /* for lun ends */
} /* if this_id != id ends */
} /* for dev ends */
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)