From: James Bottomley <James.Bottomley@SteelEye.com>
To: SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: [PATCH] add extra inquiry byte 56 data to struct scsi_device
Date: 20 Aug 2004 21:56:05 -0400 [thread overview]
Message-ID: <1093053368.3318.569.camel@mulgrave> (raw)
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 */
next reply other threads:[~2004-08-21 1:56 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-21 1:56 James Bottomley [this message]
2004-08-21 3:21 ` [PATCH] add extra inquiry byte 56 data to struct scsi_device 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
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=1093053368.3318.569.camel@mulgrave \
--to=james.bottomley@steeleye.com \
--cc=linux-scsi@vger.kernel.org \
/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