public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Douglas Gilbert <dougg@torque.net>
To: James Bottomley <James.Bottomley@SteelEye.com>
Cc: linux-scsi@vger.kernel.org
Subject: Re: [RFC] expand information in the scsi_sense_hdr
Date: Wed, 15 Jun 2005 00:25:17 -0400	[thread overview]
Message-ID: <42AFADAD.4080307@torque.net> (raw)
In-Reply-To: <1118719534.5079.93.camel@mulgrave>

James Bottomley wrote:
> Since the scsi_execute_req() call is trying to make this the standard
> way of passing back sense (mainly because scsi_execute_req() is designed
> for internal consumption, which has more simple sense parsing
> requirements) there needs to be enough information in the header for all
> sense uses within the kernel.
> 
> This patch adds the info field, the flags field, the sense key specific
> field and the command info field to the sense header.  The disadvantage
> is that it adds nineteen bytes to the sense header.

Another disadvantage is that it doesn't cope with
the newer descriptor fields that don't have equivalents
in the older fixed format. OSD and SAT have their own
sense descriptors. Vendors can (and do) have fixed sense
data (defined beyond offset 18 and field replaceable unit)
and can add their own sense descriptors [0x80 to 0xff].
Mapping extensible descriptor format (still limited to 252
bytes overall) back to a (different) fixed format could
be self defeating.

My intention with struct scsi_sense_hdr was to give
a small fixed size view of sense data (from either
fixed or descriptor format) sufficient for drivers
to do error processing. It is sufficient for many but
not all cases in drivers that I converted. I was not
trying to replace the sense data. Is the actual sense
data still going to be available to the SG_IO ioctl
and the sg driver?

BTW If you implement this change, I don't think
field member "u8 byte4;" and friends are any longer
relevant as that was to maintain the mapping between
"struct scsi_sense_data" and the descriptor format
sense data header (i.e. both 8 bytes long).

Doug Gilbert

  reply	other threads:[~2005-06-15  4:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-14  3:25 [RFC] expand information in the scsi_sense_hdr James Bottomley
2005-06-15  4:25 ` Douglas Gilbert [this message]
2005-06-15 14:04   ` 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=42AFADAD.4080307@torque.net \
    --to=dougg@torque.net \
    --cc=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