On Tue, May 22, 2001 at 04:49:49PM -0700, David Brownell wrote:
> > Thus, if I was writing and my bulk out endpoint STALLed, then yes, I want
> > the string of bulk-out transfers to all fail with -EPIPE.  However, if
> > there is a bulk-in transfer in the chain, why not do it?
> 
> Because that IN only makes sense if the OUT succeeded!

No, it doesn't.  That IN makes sense regardless -- that IN was my request
for status from the device, while the OUTs were data transfer.  The IN is
totally valid.

If it's not going to be valid, I should be more careful about my URB
chains.

> >      Better yet, if
> > there is a CLEAR_HALT in the chain, execute that too, and then everything
> > after that will be fine.
> 
> Why not do that only when the OUT bulk chain failed with EPIPE? :)

Because it's faster to just send the CLEAR_HALT than to actually stop and
look at the status -- other driver vendors have realized this, resulting in
some odd-looking but totally legal bus transactions which run very quickly.

> On error, the little queueing engine could chase "urb->alt_next"
> instead of "urb->next" ... if completion functions aren't wanted.

One could do this, yes.  It seems a bit contrived, but doable.  I'd rather
see the enginge just abort the chain processing, tho.  Of course, I'm not
convinced that the engine needs to look at the status codes at all (see
above).

If you need to look at status codes in particular places, perhaps you
should re-think your URB chains.  That, at least, is my philosophy.  YMMV.

Matt

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

Sir, for the hundreth time, we do NOT carry 600-round boxes of belt-fed 
suction darts!
                                        -- Salesperson to Greg
User Friendly, 12/30/1997

PGP signature

Reply via email to