All of lore.kernel.org
 help / color / mirror / Atom feed
From: Douglas Gilbert <dougg@torque.net>
To: linux-scsi@vger.kernel.org
Subject: [PATCH] scsi_level constants in scsi.h
Date: Tue, 24 Aug 2004 21:39:36 +1000	[thread overview]
Message-ID: <412B28F8.8000107@torque.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 282 bytes --]

The scsi_level value in struct scsi_device is a bit
mysterious. Hopefully this patch makes it a bit clearer
since it is visible via sysfs.

Changes:
   - add scsi_level constants for SPC-2 and SPC-3
   - comment on relationship between scsi_level and INQUIRY response

Doug Gilbert

[-- Attachment #2: scsi_h_2681.diff --]
[-- Type: text/x-patch, Size: 769 bytes --]

--- linux/include/scsi/scsi.h	2004-08-14 21:12:52.000000000 +1000
+++ linux/include/scsi/scsi.h2681sl	2004-08-24 21:34:25.866435024 +1000
@@ -353,14 +353,19 @@
 		     ((lun) & 0x07))
 
 /*
- *  SCSI command sets
+ *  struct scsi_device::scsi_level values. For SCSI devices other than those
+ *  prior to SCSI-2 (i.e. over 12 years old) this value is (resp[2] + 1)
+ *  where "resp" is a byte array of the response to an INQUIRY. The scsi_level
+ *  variable is visible to the user via sysfs.
  */
 
 #define SCSI_UNKNOWN    0
 #define SCSI_1          1
 #define SCSI_1_CCS      2
 #define SCSI_2          3
-#define SCSI_3          4
+#define SCSI_3          4        /* SPC */
+#define SCSI_SPC_2      5
+#define SCSI_SPC_3      6
 
 /*
  * INQ PERIPHERAL QUALIFIERS

             reply	other threads:[~2004-08-24 11:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-24 11:39 Douglas Gilbert [this message]
2004-08-24 11:52 ` [PATCH] scsi_level constants in scsi.h Christoph Hellwig
2004-08-25  1:33   ` Douglas Gilbert

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=412B28F8.8000107@torque.net \
    --to=dougg@torque.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.