On Fri, Feb 06, 2004 at 10:24:25AM -0500, James Bottomley wrote:
> On Fri, 2004-02-06 at 09:59, Alan Stern wrote:
> > Who says it's wrong to retrieve sense information when there is an
> > underrun but not Check Condition?  Can you provide a reference to a
> > published (or draft) document that states this?
> 
> It's not wrong according to the SCSI standards, a REQUEST SENSE issued
> to a device with no sense data will produce a NO SENSE key.
> 
> However, because of the way sense is processed in contingent allegiance
> conditions (suspending the I_T_L nexus until sense is cleared) it is
> dangerous to issue arbitrary request sense commands because you may
> receive sense for a different command (and prevent that command from
> erroring correctly).

You'll excuse me if I stare at you blankly after you say this?

If I'm guessing correctly, this is only an issue with multiple pending
commands (i.e. TCQ or somesuch)?

A USB device only ever has one command at a time.

> The SCSI mid-layer definitely does not expect this behaviour.  A driver
> either does not do any sense commands at all or it only issues a REQUEST
> SENSE in response to a Check Condition status in order not to have the
> nexus halted because of a contingent allegiance condition (simulating
> ACA if you will).

'Check Condition' isn't something we can directly observe.  We get 2 status
bits back which encode "good", "bad", or "you're screwed -- you are now
required to perform a reset".

Matt

-- 
Matthew Dharm                              Home: [EMAIL PROTECTED] 
Maintainer, Linux USB Mass Storage Driver

Stef, you just got beaten by a ball of DIRT.
                                        -- Greg
User Friendly, 12/7/1997

Attachment: pgp00000.pgp
Description: PGP signature

Reply via email to