Subject: RE: iSCSI: current UNH Plugfest

From: Robert Snively <[email-masked]>
Date: Wed, 31 Oct 2001 12:39:27 -0800

The "MUST have sense information if CHECK CONDITION" is 
a property of SCSI that requires the use of autosensing,
as iSCSI does. 

It is only non autosensing drivers that will present
CHECK CONDITION indications with sense data missing.

Sense Data will never be generated in a data segment to any command except
REQUEST SENSE.  In that case, CHECK CONDITION will never
be indicated unless the REQUEST SENSE command failed in
some way, and (if autosensing is used), the CHECK CONDITION
will be associated with its own set of sense information in
the response PDU.

Note that if the unit cannot assemble relevant sense information
from the attached hardware, that is in itself a CHECK CONDITION,
and the corresponding inability to access critical hardware
must be posted in the sense information.

That is why MUST is the proper requirement.

Bob

> -----Original Message-----
> From: Santosh Rao [mailto:[email-masked]]
> Sent: Wednesday, October 31, 2001 11:53 AM
> To: Anshul Chadda
> Cc: [email-masked]
> Subject: Re: iSCSI: current UNH Plugfest
> 
> 
> Anshul,
> 
> I don't know why the initiator should care if the sense data arrived
> along with the CHECK CONDITION scsi status or not. (?)
> 
> Most, if not all, SCSI initiator stacks have some form of indicating
> sense_status from SCSI LLP (hba driver, device driver, 
> mini-port driver,
> etc) to SCSI ULP (class driver, target driver, etc), which indicates
> what the status of the sense operation was and whether sense data is
> available or not.
> 
> For instance, you also need to deal with a scenario where the target
> sends a SCSI status of CHECK CONDITION and accompanies it 
> with the sense
> data in the data segment. However, the initiator encounters a data
> digest error on the sense data data segment and drops the sense data
> data segment. The initiator can always choose to complete the I/O and
> return the SCSI status back to its SCSI ULP, indicating that no sense
> data was available.
> 
> I don't see why you would need the wording tightened to a MUST.
> Initiators must not assume that the sense data will always be 
> available
> on a check condition. The sense operation may be unsuccessful and no
> sense data may be available.
> 
> Regards,
> Santosh
> 
> 
> > Anshul Chadda wrote:
> > 
> > Hello:
> > As this issue has come up with setting CHECK CONDITION in the SCSI
> > Response. It is assumed that if CHECK CONDITION is set in the SCSI
> > Response PDU, then there has to be sense data accompanied 
> with it. So
> > as far as I see it, it would help if the following sentence in the
> > draft has the MUST/must in there. In the current wording, i 
> can think
> > that if there is no data segment in the SCSI Response PDU 
> for a CHECK
> > CONDITION, it is still OK.
> > 
> > In draft 8, the sentence looks like the following:
> > -------------------------------------------------------
> > 3.4.6 Data Segment - Sense and Response Data Segment
> > 
> > iSCSI targets MUST support and enable autosense. If Status is CHECK
> > CONDITION (0x02), then the Data Segment contains sense data for the
> > failed command.
> > 
> > -------------------------------------------------------
> > 
> > It can be changed to the following:
> > 
> > -------------------------------------------------------
> > 3.4.6 Data Segment - Sense and Response Data Segment
> > 
> > iSCSI targets MUST support and enable autosense. If Status is CHECK
> > CONDITION (0x02), then the target MUST have sense data in the data
> > segment for the failed command.
> > 
> > -------------------------------------------------------
> > 
> > I don't know if there is a reason that the draft has the wording in
> > the current way.  Apologies if this subject has already been
> > discussed.
> > 
> > Regards,
> > Anshul
> > 
> > 
> --------------------------------------------------------------
> ---------------------------------------------------
> > 
> > 5. Some common error situations:
> > 
> >    1) - when a SCSI Response contains a CHECK CONDITION 
> (Status=0x02),
> >       some targets are not including the SenseLength as the first 2
> >       bytes in the data segment.  Although the format of the data
> > segment
> >       is clear from the diagram in section 3.4.6 on page 62 
> of draft 8
> >       (page 63 of draft 8a), the last entry in the diagram for the
> > SCSI
> >       Response PDU on page 58 of draft 8 (page 59 of draft 8a) is
> >       misleading because it mentions only the Sense Data 
> and Response
> >       Data and omits the Sense Length.  It would therefore 
> be helpful
> >       if the last entry in the diagram on page 58 were changed to
> > explicitly
> >       reference the diagram on page 62, as in:
> > 
> >          Data Segment -- see section 3.4.6 (optional)
> > 
> > 
> 
> -- 
> ##################################
> Santosh Rao
> Software Design Engineer,
> HP-UX iSCSI Driver Team,
> Hewlett Packard, Cupertino.
> email : [email-masked]
> Phone : 408-447-3751
> ##################################
>

---

From: Santosh Rao <[email-masked]>
Date: Wed, 31 Oct 2001 13:41:40 -0800

> will be associated with its own set of sense information in

The SCSI sense data is contained in the data segment of the SCSI
Response pdu. Hence, it is possible for the initiator to receive the
header of the scsi response pdu containing the SCSI Status, but not the
data segment (sense data) of the scsi response pdu, due to a data digest
error. 

- Santosh