On Tue, 25 Jun 2002, Duncan Sands wrote:

>E:  Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=50ms
>
>Does this mean that an urb for this endpoint must be of
>interrupt type?

No, you could use an interrupt or bulk URB.

>As far as I can see from the code in devio.c, an urb of any
>type can be submitted to any endpoint.  What does this mean?

It kind of depends on the data format.

Bulk and Interrupt use the same format (a single data buffer).
Control has a special header that's 8 bytes.  Iso is segmented into
mulitple transfers which are executed at specific times.

So really only Bulk URBs can be used on INT endpoints, and vice versa.
It's not terribly useful to poll a Bulk endpoint with a Interrupt URB
(since you'd transfer rather slowly) so it winds up the only
useful cross-use is just Bulk URB to Interrupt endpoint.

This is useful since Bulk does not use automatic resubmission.
usbdevfs can't handle auto-resubmit, so to talk to an interrupt
endpoint via usbdevfs you need to use either Bulk URBs or a "one-shot"
interrupt URB.

"one-shot" interrupt is the exact same as bulk except interrupt is
scheduled earlier in each USB frame (interrupt has guaranteed
bandwidth) while bulk is scheduled last in each USB frame (bulk has no
guarantee).  So under heavy bus load (i.e. over 100%) some of the bulk
polls will be skipped.  This turns out to (in almost all cases)
not be an issue - you most likely will never lose data.  Also a
second difference is bulk can be queued and interrupt cannot, at least
not on UHCI (yet).

Both bulk and 1-shot interrupt poll very fast (I've traced up to 1
poll per 16 microsec on USB 1.1) so if you want to slow that down (the
USB 1.1 spec states you shouldn't poll an interrupt endpoint faster
than 1 poll per millisec) then turn on USB_NO_FSBR to slow the polling
to 1 per ms.

-- 
Dan Streetman
[EMAIL PROTECTED]
--------------------------------------------------
186,282 miles per second:
It isn't just a good idea, it's the law!



-------------------------------------------------------
This sf.net email is sponsored by: Jabber Inc.
Don't miss the IM event of the season | Special offer for OSDN members! 
JabConf 2002, Aug. 20-22, Keystone, CO http://www.jabberconf.com/osdn
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to