On Mon, May 21, 2001 at 05:36:34PM -0400, Johannes Erdfelt wrote:
> > Yes, I realize that I could try to prep the next URB while one is running,
> > but then there are synchronization problems.  So, if I'm preping them all
> > in advance anyway....
> 
> I dunno if that's possible. If one of the previous URB's fails, the
> behvaiour is poorly defined.
> 
> Right now it submits along the chain merrily. I dunno if that's the
> desired behaviour or not.

I would argue that this is exactly the behavior that I want.

The issue comes into play when doing what I call "transactions" -- multiple
URBs that all go together.

For example, consider the case of usb-storage.  To read a block of data, I
need to submit perhaps 12 URBs total -- 1 for the command, 10 blocks of
data (sg segments), and 1 for status.

When something goes wrong in the mass storage protocol, the endpoint
stalls.  Thus, if the floppy gets yanked in the middle of the transfer,
then the endpoint stalls and 5 out of 10 data URBs return -EPIPE, while the
status URB at the end successfully retrieves the status of the device.

To me, at least, this is the simple and clean way of doing things.

If nothing else, I think we (developers, HCD authors, and documentation)
should all agree and be clear on exactly what ->next and QUEUE_BULK do.

Matt

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

NYET! The evil stops here!
                                        -- Pitr
User Friendly, 6/22/1998

PGP signature

Reply via email to