From: Luben Tuikov <luben@splentec.com>
To: Douglas Gilbert <dougg@torque.net>
Cc: linux-scsi <linux-scsi@vger.kernel.org>
Subject: Re: status as in SAM2
Date: Sun, 26 May 2002 18:33:51 -0400 [thread overview]
Message-ID: <3CF162CF.9D137E50@splentec.com> (raw)
In-Reply-To: 3CF01627.3C6866C@torque.net
Thanks Douglas,
I looked in the low-level scsi device drivers (LLDD)
and it seems to me that not all bother to set
the status byte right (even more so for emulated
scsi like the 3ware).
For compatibility I use something like this:
status = (uint8_t) ((status_byte(SCpnt->result) << 1) & 0xFF);
but I'd _much_ rather use the form you suggested:
status = SCpnt->result & 0xFF;
but am not sure if the position of the status byte
will change within the 32 bit result.
It would even be better if the device server status
byte has it's own byte variable in SCpnt, so that
LLDD writers feel ``encouraged'' to set it explicitly,
rather than the mid-level try and guess its value
using scsi_sense_valid(), and the driver byte...
> Perhaps it is time (in lk 2.5) to get rid of the current
> status_byte macro "cleverness", change it to:
> #define status_byte(result) ((result) & 0xff)
I'm all for it!
Thanks,
--
Luben
P.S. A new breed of SCSI HBA heavily rely
on the device server status byte being reported right,
and I'm kind of set back to see that the LLDD don't
report it always... But I guess that depends on
the underlying hardware (device server)...
prev parent reply other threads:[~2002-05-26 22:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-05-24 15:11 status as in SAM2 Luben Tuikov
2002-05-25 22:54 ` Douglas Gilbert
2002-05-26 22:33 ` Luben Tuikov [this message]
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=3CF162CF.9D137E50@splentec.com \
--to=luben@splentec.com \
--cc=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.