patch-2.4.9 linux/drivers/scsi/scsi_scan.c

Next file: linux/drivers/scsi/sr_ioctl.c
Previous file: linux/drivers/scsi/scsi_lib.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.8/linux/drivers/scsi/scsi_scan.c linux/drivers/scsi/scsi_scan.c
@@ -153,6 +153,10 @@
 	{"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
+	{"Zzyzx", "RocketStor 500S", "*", BLIST_SPARSELUN},
+	{"Zzyzx", "RocketStor 2000", "*", BLIST_SPARSELUN},
 	{"SONY", "TSL",       "*", BLIST_FORCELUN},  // DDS3 & DDS4 autoloaders
 	{"DELL", "PERCRAID", "*", BLIST_FORCELUN},
 	{"HP", "NetRAID-4M", "*", BLIST_FORCELUN},
@@ -565,20 +569,26 @@
 	}
 
 	/*
-	 * Check the peripheral qualifier field - this tells us whether LUNS
-	 * are supported here or not.
+	 * Check for SPARSELUN before checking the peripheral qualifier,
+	 * so sparse lun devices are completely scanned.
 	 */
-	if ((scsi_result[0] >> 5) == 3) {
-		scsi_release_request(SRpnt);
-		return 0;	/* assume no peripheral if any sort of error */
-	}
 
 	/*
 	 * Get any flags for this device.  
 	 */
 	bflags = get_device_flags (scsi_result);
 
-
+	if (bflags & BLIST_SPARSELUN) {
+	  *sparse_lun = 1;
+	}
+	/*
+	 * Check the peripheral qualifier field - this tells us whether LUNS
+	 * are supported here or not.
+	 */
+	if ((scsi_result[0] >> 5) == 3) {
+		scsi_release_request(SRpnt);
+		return 0;	/* assume no peripheral if any sort of error */
+	}
 	 /*   The Toshiba ROM was "gender-changed" here as an inline hack.
 	      This is now much more generic.
 	      This is a mess: What we really want is to leave the scsi_result

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)