From: Douglas Gilbert <dougg@torque.net>
To: linux-scsi@vger.kernel.org
Subject: [PATCH] SAM-3 status codes
Date: Thu, 23 Jan 2003 10:10:18 +1100 [thread overview]
Message-ID: <3E2F24DA.50206@torque.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 517 bytes --]
The perverse CHECK_CONDITION in include/scsi/scsi.h seems
to have struck again (see "Can't burn DVD under 2.5.59 with
ide-cd" thread on the linux kernel list). Most users of
CHECK_CONDITION found out to their surprise that it is
shifted 1 bit (right) from those values found in the
standards.
The attachment marks the orginal list of SCSI status codes
as deprecated and supplies defines taken from the most
recent SAM-3 draft.
The patch is against 2.5.59 but may also be suitable for
the lk 2.4 tree.
Doug Gilbert
[-- Attachment #2: sam_stats_2559.diff --]
[-- Type: text/plain, Size: 1068 bytes --]
--- linux/include/scsi/scsi.h 2002-12-24 18:12:54.000000000 +1100
+++ linux/include/scsi/scsi.h2559sam 2003-01-23 09:54:00.000000000 +1100
@@ -104,7 +104,26 @@
/*
- * Status codes
+ * SCSI Architecture Model (SAM) Status codes. Taken from SAM-3 draft
+ * T10/1561-D Revision 4 Draft dated 7th November 2002.
+ */
+#define SAM_STAT_GOOD 0x00
+#define SAM_STAT_CHECK_CONDITION 0x02
+#define SAM_STAT_CONDITION_MET 0x04
+#define SAM_STAT_BUSY 0x08
+#define SAM_STAT_IMMEDIATE 0x10
+#define SAM_STAT_IMMEDIATE_CONDITION_MET 0x14
+#define SAM_STAT_RESERVATION_CONFLICT 0x18
+#define SAM_STAT_COMMAND_TERMINATED 0x22 /* obsolete in SAM-3 */
+#define SAM_STAT_TASK_SET_FULL 0x28
+#define SAM_STAT_ACA_ACTIVE 0x30
+#define SAM_STAT_TASK_ABORTED 0x40
+
+/*
+ * Status codes. These are deprecated as they are shifted 1 bit right
+ * from those found in the SCSI standards. This causes confusion for
+ * applications that are ported to several OSes. Prefer SAM Status codes
+ * above.
*/
#define GOOD 0x00
next reply other threads:[~2003-01-22 23:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-01-22 23:10 Douglas Gilbert [this message]
2003-01-23 2:30 ` [PATCH] SAM-3 status codes Andre Hedrick
2003-01-23 7:48 ` Jens Axboe
2003-01-23 8:24 ` Andre Hedrick
2003-01-27 10:36 ` 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=3E2F24DA.50206@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox