public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] add extra inquiry byte 56 data to struct scsi_device
@ 2004-08-21  1:56 James Bottomley
  2004-08-21  3:21 ` Jeff Garzik
  2004-08-21 13:03 ` Douglas Gilbert
  0 siblings, 2 replies; 9+ messages in thread
From: James Bottomley @ 2004-08-21  1:56 UTC (permalink / raw)
  To: SCSI Mailing List

The idea here is to get a full range of device capabilites in the
scsi_device structure so there's absolutely no need at all for drivers
to snoop the inquiry data.

The missing parameters were:

dt_only - means the device only supports DT transfers (not ST)
ius - means the device supports information unit (IU) transfers
qas - means the device supports the Quick Arbitration and Selection
protocol

Our rather misnamed ones are:

ppr - means the device does DT (DT negotiation may only be done via PPR)
wdtr - means the device does wide
sdtr - means the device does sync

James

===== drivers/scsi/scsi_scan.c 1.127 vs edited =====
--- 1.127/drivers/scsi/scsi_scan.c	2004-06-25 06:56:28 -05:00
+++ edited/drivers/scsi/scsi_scan.c	2004-08-20 11:30:09 -05:00
@@ -576,9 +576,16 @@
 	sdev->lockable = sdev->removable;
 	sdev->soft_reset = (inq_result[7] & 1) && ((inq_result[3] & 7) == 2);
 
-	if (sdev->scsi_level >= SCSI_3 || (sdev->inquiry_len > 56 &&
-		inq_result[56] & 0x04))
-		sdev->ppr = 1;
+	if (sdev->inquiry_len > 56) {
+		if (inq_result[56] & 0x04)
+			sdev->ppr = 1;
+		if ((inq_result[56] & 0x0c) == 0x04)
+			sdev->dt_only = 1;
+		if (inq_result[56] & 0x01)
+			sdev->ius = 1;
+		if (inq_result[56] & 0x02)
+			sdev->qas = 1;
+	}
 	if (inq_result[7] & 0x60)
 		sdev->wdtr = 1;
 	if (inq_result[7] & 0x10)
===== include/scsi/scsi_device.h 1.19 vs edited =====
--- 1.19/include/scsi/scsi_device.h	2004-07-07 11:24:13 -05:00
+++ edited/include/scsi/scsi_device.h	2004-08-20 11:31:05 -05:00
@@ -89,6 +92,10 @@
 	unsigned sdtr:1;	/* Device supports SDTR messages */
 	unsigned wdtr:1;	/* Device supports WDTR messages */
 	unsigned ppr:1;		/* Device supports PPR messages */
+	unsigned dt_only:1;	/* Device only supports DT */
+	unsigned ius:1;		/* Device Supports IUs */
+	unsigned qas:1;		/* Device Support Quick Arbitration
+				 * and Selection */
 	unsigned tagged_supported:1;	/* Supports SCSI-II tagged queuing */
 	unsigned simple_tags:1;	/* simple queue tag messages are enabled */
 	unsigned ordered_tags:1;/* ordered queue tag messages are enabled */


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

end of thread, other threads:[~2004-08-21 13:51 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-21  1:56 [PATCH] add extra inquiry byte 56 data to struct scsi_device James Bottomley
2004-08-21  3:21 ` Jeff Garzik
2004-08-21  3:39   ` James Bottomley
2004-08-21  4:06   ` James Bottomley
2004-08-21  4:41     ` Jeff Garzik
2004-08-21  4:38   ` Randy.Dunlap
2004-08-21  4:57     ` Jeff Garzik
2004-08-21 13:03 ` Douglas Gilbert
2004-08-21 13:51   ` James Bottomley

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