* sense data for status GOOD
@ 2010-03-30 16:01 Douglas Gilbert
2010-04-06 12:15 ` Boaz Harrosh
0 siblings, 1 reply; 2+ messages in thread
From: Douglas Gilbert @ 2010-03-30 16:01 UTC (permalink / raw)
To: linux-scsi
The folk at t10.org slipped this innocuous looking
addition into sam5r04 section 5.3.1 on status codes.
"Sense data may be delivered in the buffer defined by
the Sense Data argument of the Execute Command
procedure call (see 5.1) for any status code."
Previously sense data was only valid for status
CHECK_CONDITION [0x2] (and the obsolete
COMMAND_TERMINATED [0x22]). The quoted section in
the previous paragraph means that sense data could
arrive with any status code.
And now with draft sbc3r22 there is an example:
status=GOOD, sense_key=COMPLETED (recently added)
additional_sense_qualifier="INSPECT REFERRALS
SENSE DESCRIPTORS". Referrals are new and explained
in sbc3r22. IMO only a very small audience would
be interested in them. However it does indicate
a new trend.
So the question for the Linux scsi subsystem is
does it (or can it without many changes) convey
"non CHECK_CONDITION" sense data back up from
an initiator (LLD) to code that might care?
Doug Gilbert
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: sense data for status GOOD
2010-03-30 16:01 sense data for status GOOD Douglas Gilbert
@ 2010-04-06 12:15 ` Boaz Harrosh
0 siblings, 0 replies; 2+ messages in thread
From: Boaz Harrosh @ 2010-04-06 12:15 UTC (permalink / raw)
To: dgilbert; +Cc: linux-scsi
On 03/30/2010 07:01 PM, Douglas Gilbert wrote:
> The folk at t10.org slipped this innocuous looking
> addition into sam5r04 section 5.3.1 on status codes.
>
> "Sense data may be delivered in the buffer defined by
> the Sense Data argument of the Execute Command
> procedure call (see 5.1) for any status code."
>
> Previously sense data was only valid for status
> CHECK_CONDITION [0x2] (and the obsolete
> COMMAND_TERMINATED [0x22]). The quoted section in
> the previous paragraph means that sense data could
> arrive with any status code.
>
> And now with draft sbc3r22 there is an example:
> status=GOOD, sense_key=COMPLETED (recently added)
> additional_sense_qualifier="INSPECT REFERRALS
> SENSE DESCRIPTORS". Referrals are new and explained
> in sbc3r22. IMO only a very small audience would
> be interested in them. However it does indicate
> a new trend.
>
>
> So the question for the Linux scsi subsystem is
> does it (or can it without many changes) convey
> "non CHECK_CONDITION" sense data back up from
> an initiator (LLD) to code that might care?
>
scsi_cmnd->sense_buffer has an hard coded max_size and no associated
current_size member. the scsi-ml, given a CHECK_CONDITION, will
analyse the ->sense_buffer and determine it's size, then will copy
the content and set the size into request's sense members. All this
you already know.
Now what do you want to happen?
A. Only LLD knows when sense is available through host specific flags.
In that case:
I propose a new scsi_set_sense() that will just set the proper
request members. It should be called only if != CHECK_CONDITION,
since in that case it will just be over-written by the scsi-ml again.
(Or not that can be changed as well).
[This is a simple change, but needs LLD specific code every time]
B. The protocol defines when a sense is available, by status + cmnd
combination, the sense is set by the target, the LLD has no special
knowledge if sense is present or not. In this case scsi-ml can just
inspect for these conditions and copy sense up the stack as before.
Next step is for some ULD, to actually inspect these fields.
> Doug Gilbert
>
It does not look too complicated either way.
Boaz
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-04-06 12:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-30 16:01 sense data for status GOOD Douglas Gilbert
2010-04-06 12:15 ` Boaz Harrosh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).