public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] 2.4.23
@ 2003-12-17 16:13 Frank Borich
  2003-12-28 20:10 ` Christoph Hellwig
  0 siblings, 1 reply; 4+ messages in thread
From: Frank Borich @ 2003-12-17 16:13 UTC (permalink / raw)
  To: linux-scsi

Hi All,

My name is Frank Borich, representing Xyratex International
(http://www.xyratex.com).  We design, and manufacture Data Storage
Subsystems.  During integration testing, we discovered that a patch to
scsi_scan.c is required (2.4.x kernels only), in order to set the
BLIST_SPARSELUN flag for our subsystems.  This flag adds support for
non-contiguous lun numbering.  We are unable to use the already
implemented "device_list" to set flags for our subsystems.  This is due
to the fact that we sell only to OEMs, and vendor name will change.
Rather than submit a separate patch for each branded subsystem we can
look elsewhere in the SCSI inquiry data, and set the flag accordingly.
The logic below, is executed once the end of the device_list is reached.
When the end of the table is reached, a memcmp is issued to look for a
particular string located at offset 96.  If the string is found, the
flag BLIST_SPARSELUN is returned.  Below is a patch for the SCSI driver
(scsi_scan.c). 


diff -urN linux-2.4.23/drivers/scsi/scsi_scan.c
linux-2.4.23.changed/drivers/scsi/scsi_scan.c
--- linux-2.4.23/drivers/scsi/scsi_scan.c	2003-12-03
08:56:28.000000000 -0600
+++ linux-2.4.23.changed/drivers/scsi/scsi_scan.c	2003-12-03
09:02:15.000000000 -0600
@@ -292,8 +292,16 @@
 	int i = 0;
 	unsigned char *pnt;
 	for (i = 0; 1; i++) {
-		if (device_list[i].vendor == NULL)
+		if (device_list[i].vendor == NULL){
+			/* Set flags for Xyratex subsystems here (all
OEMs). 
+			Cannot use device_list because can have
different vendor names for same device */
+			pnt = &response_data[96];
+			while (*pnt && *pnt == ' ')
+				pnt++;
+			if (memcmp("Xyratex F7",pnt,10) == 0)
+			return BLIST_SPARSELUN;
 			return 0;
+		}
 		pnt = &response_data[8];
 		while (*pnt && *pnt == ' ')
 			pnt++;
Frank Borich
------------------------------------------------------------------
Systems Engineer
Direct 630 654 6089
Fax 630 325 2513
e-mail frank_borich@us.xyratex.com
 


Frank Borich
------------------------------------------------------------------
Systems Engineer
Direct 630 654 6089
Fax 630 325 2513
e-mail frank_borich@us.xyratex.com
 


^ permalink raw reply	[flat|nested] 4+ messages in thread
* RE: [PATCH] 2.4.23
@ 2003-12-31 15:14 Frank Borich
  0 siblings, 0 replies; 4+ messages in thread
From: Frank Borich @ 2003-12-31 15:14 UTC (permalink / raw)
  To: James Bottomley, Christoph Hellwig; +Cc: SCSI Mailing List

Shall I generate a patch that uses a function pointer in the blacklist,
to poke at the inquiry data, for 2.4 ?  

Frank Borich
------------------------------------------------------------------
Systems Engineer
Direct 630 654 6089
Fax 630 325 2513
e-mail frank_borich@us.xyratex.com
 

> -----Original Message-----
> From: James Bottomley [mailto:James.Bottomley@steeleye.com]
> Sent: Sunday, December 28, 2003 2:46 PM
> To: Christoph Hellwig
> Cc: Frank Borich; SCSI Mailing List
> Subject: Re: [PATCH] 2.4.23
> 
> On Sun, 2003-12-28 at 14:10, Christoph Hellwig wrote:
> > I'm not too happy about the form of this patch. Could you cook up
one
> > for 2.6.0 that adds a function pointer to poke at the inquiry data
> > to the blacklist?  We could backport it to 2.4 later.
> 
> Actually, this can't really be done at all for 2.6 since we're
extremely
> careful not to get inquiry data beyond byte 56 and this patch is
looking
> into the vendor specific area at 96.
> 
> James
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-12-31 15:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-12-17 16:13 [PATCH] 2.4.23 Frank Borich
2003-12-28 20:10 ` Christoph Hellwig
2003-12-28 20:45   ` James Bottomley
  -- strict thread matches above, loose matches on Subject: below --
2003-12-31 15:14 Frank Borich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox