On Tue, 22 Jul 2003, David Brownell wrote:
> > The setting of SPD is not directly related to the URB_SHORT_NOT_OK
> > flag. All that flag means is that a short read transfer should return
> > with status -EREMOTEIO rather than status 0. This is already tested for
>
> Basically right -- there's also an effect on queueing behavior.
>
> In particular, since "real faults" should stop the queue (so
> that drivers can clean up), I think that URB_SHORT_NOT_OK puts
> short reads into the category of "real faults" rather than
> the "expected behavior" category.
>
> I recall that EHCI and OHCI do block queue advances after
> a SHORT_NOT_OK short read, but continue it for other IN
> endpoints ... but of course, UHCI transfers so little data
> with each TD that it might not be able to do that so well.
The big difference is that the UHCI driver isn't truly endpoint-oriented.
Also it never really stops a queue from advancing, regardless of the type
of error. That is, the queue blocks only until the offending URB is
dequeued, and then it is allowed to proceed.
If a driver wants to submit several URBs, but the values of the later ones
will depend on the result of the first, then the URBs must not be queued.
They should be submitted one-at-a-time. Unfortunately, this prohibits the
benefits of optimistic queueing ("Success is the most probable result, so
assume it will work"). Maybe that behavior should be changed.
> > and handled properly in uhci_result_control() and uhci_result_common().
> > The flag doesn't mean that SPD should or should not be set.
> >
> > Taken together, these arguments show that SPD should always be set for
> > every queued (i.e., not isochronous) input TD that's not the last one in
> > its URB.
>
> Why the "not the last" exception?
The last TD always has its IOC (Interrupt On Completion) bit set, so an
interrupt request would be generated in any case. However, if the queue
should also be blocked from advancing, then SPD should be set for those
TDs as well. The lack of proper specification in the Design Guide also
argues for that course.
Alan Stern
-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel