mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Michael F. Brown" <mbrown@emc.com>
To: Gary_Lerhaupt@Dell.com, Kevin_Burroughs@Dell.com,
	linux-kernel@vger.kernel.org, mbrown@emc.com,
	Michael_E_Brown@Dell.com, robert_macaulay@Dell.com
Subject: [PATCH] Add BLIST_SCSI2_8LUN flag (2.4.13-pre4)
Date: Thu, 18 Oct 2001 12:05:26 -0400	[thread overview]
Message-ID: <E15uFfi-0004lL-00@lapi0061.lss.emc.com> (raw)

Hi,

My recent patch preventing scan_scsis() from sending INQUIRY's
to SCSI_2 devices at LUN > 7 showed up in linux-2.4.13-pre2.  It
does not take into account non-standard SCSI_2 devices which support
LUN > 7 (i.e. Dell PV 650F).  The following patch generated against
linux-2.4.13-pre4 adds a new 'BLIST_SCSI2_8LUN' for such devices.
Without this patch users of 2.4.13 and CLARiiON storage may discover
they are missing devices.  Folks at Dell have verified the patch
fixes the issue.  This was posted a few days ago to linux-scsi but
it hasn't shown up as of linux-2.4.13-pre4.  Please apply for 2.4.13.

-Michael F. Brown, EMC Corp.

Email:            mbrown@emc.com

"In theory, there is no difference between theory and practice,
 but in practice, there is."       - Jan L.A. van de Snepscheut

--- linux-2.4.13-pre4/drivers/scsi/scsi_scan.c	Thu Oct 18 11:38:47 2001
+++ linux/drivers/scsi/scsi_scan.c	Thu Oct 18 11:39:26 2001
@@ -38,6 +38,7 @@
 #define BLIST_MAX5LUN		0x080
 #define BLIST_ISDISK    	0x100
 #define BLIST_ISROM     	0x200
+#define BLIST_SCSI2_8LUN	0x400 /* SCSI_2 devices supporting LUN > 7 */
 
 static void print_inquiry(unsigned char *data);
 static int scan_scsis_single(unsigned int channel, unsigned int dev,
@@ -146,12 +147,12 @@
  	{"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
+	{"DGC",  "RAID",      "*", BLIST_SPARSELUN | BLIST_SCSI2_8LUN}, // Dell PV 650F (tgt @ LUN 0)
+	{"DGC",  "DISK",      "*", BLIST_SPARSELUN | BLIST_SCSI2_8LUN}, // Dell PV 650F (no tgt @ LUN 0)
+	{"DELL", "PV660F",   "*", BLIST_SPARSELUN | BLIST_SCSI2_8LUN},
+	{"DELL", "PV660F   PSEUDO",   "*", BLIST_SPARSELUN | BLIST_SCSI2_8LUN},
+	{"DELL", "PSEUDO DEVICE .",   "*", BLIST_SPARSELUN | BLIST_SCSI2_8LUN}, // Dell PV 530F
+	{"DELL", "PV530F",    "*", BLIST_SPARSELUN | BLIST_SCSI2_8LUN}, // Dell PV 530F
 	{"EMC", "SYMMETRIX", "*", BLIST_SPARSELUN},
 	{"CMD", "CRA-7280", "*", BLIST_SPARSELUN},   // CMD RAID Controller
 	{"CNSI", "G7324", "*", BLIST_SPARSELUN},     // Chaparral G7324 RAID
@@ -421,10 +422,6 @@
 					 max_scsi_luns : shpnt->max_lun);
 					sparse_lun = 0;
 					for (lun = 0, lun0_sl = SCSI_2; lun < max_dev_lun; ++lun) {
-						/* don't probe further for luns > 7 for targets <= SCSI_2 */
-						if ((lun0_sl < SCSI_3) && (lun > 7))
-							break;
-
 						if (!scan_scsis_single(channel, order_dev, lun, lun0_sl,
 							 	       &max_dev_lun, &sparse_lun, &SDpnt, shpnt,
 								       scsi_result)
@@ -432,6 +429,13 @@
 							break;	/* break means don't probe further for luns!=0 */
 						if (SDpnt && (0 == lun))
 							lun0_sl = SDpnt->scsi_level;
+
+						/* don't probe further for luns > 7 for targets <= SCSI_2
+						 * except for BLIST_SCSI2_8LUN devices
+						 */
+						if (((lun0_sl < SCSI_3) && (lun >= 7)) &&
+						   !(get_device_flags (scsi_result) & BLIST_SCSI2_8LUN))
+							break;
 					}	/* for lun ends */
 				}	/* if this_id != id ends */
 			}	/* for dev ends */

                 reply	other threads:[~2001-10-18 16:01 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E15uFfi-0004lL-00@lapi0061.lss.emc.com \
    --to=mbrown@emc.com \
    --cc=Gary_Lerhaupt@Dell.com \
    --cc=Kevin_Burroughs@Dell.com \
    --cc=Michael_E_Brown@Dell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robert_macaulay@Dell.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®