All of lore.kernel.org
 help / color / mirror / Atom feed
From: Douglas Gilbert <dougg@torque.net>
To: James Bottomley <James.Bottomley@steeleye.com>
Cc: Sachin Sant <sachinp@in.ibm.com>,
	SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: [Patch]Status_byte() in drivers/scsi/scsi.h
Date: Fri, 20 Jun 2003 23:52:39 +1000	[thread overview]
Message-ID: <3EF311A7.8030102@torque.net> (raw)
In-Reply-To: <1056112633.1804.5.camel@mulgrave>

James Bottomley wrote:
> On Fri, 2003-06-20 at 03:40, Sachin Sant wrote:
> 
>>According to Dougs comments , here is the patch to include new macros
>>for SAM status codes . Patch is in drivers/scsi/scsi.h
>>
>>+#define sam_status_value(scmd_result) ((scmd_result) & 0x7e)
> 
> 
> This is not the correct thing to do.  Our problems with the status byte
> stem from its evolving meaning.  In SCSI-1, it was a bitmap, in SCSI-2 a
> value in a bitrange of reserved bits and in SCSI-3 it covers an entire
> byte.  In SAM-3 all the defined codes have bit zero set to zero, so your
> current patch would do no harm for now, but bit zero is no-longer a
> reserved bit.

SAM-3 (rev 7) doesn't say status is a byte either.
However since it doesn't define the endianess of
status then it is probably safe to assume it is.
If we choose a mask of 0xff we could only upset
SCSI-1 (and perhaps CCS) devices. Many of those
around?


On a related subject, SPC-3 defines a new "descriptor" sense
data format (see section 4.5). It is a lot cleaner and more
compact than the original one and is controlled by the D_SENSE
bit in the control mode page. Has anybody seen a target
that supports these?

Doug Gilbert



  reply	other threads:[~2003-06-20 13:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-19  8:47 Status_byte() in drivers/scsi/scsi.h Sachin Sant
2003-06-19  9:10 ` Douglas Gilbert
2003-06-20  8:40   ` [Patch]Status_byte() " Sachin Sant
2003-06-20 12:37     ` James Bottomley
2003-06-20 13:52       ` Douglas Gilbert [this message]
2003-06-20 14:39         ` Jeff Garzik

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=3EF311A7.8030102@torque.net \
    --to=dougg@torque.net \
    --cc=James.Bottomley@steeleye.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=sachinp@in.ibm.com \
    /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.