On Tuesday 21 March 2006 9:31 am, Alan Stern wrote:

> That's right.  usb_ep_alloc_buffer doesn't really use the endpoint 
> argument, so it doesn't matter whether we specify the bulk-in or the 
> bulk-out endpoint.  Basically, any buffer can be used with any endpoint 
> (except possibly endpoint 0).

That's not true.  Controller drivers are certainly allowed to use
that argument ... it's provided so that they _can_ use it.  Some do.

Example, if the endpoint isn't DMA-capable that call never needs to be
implemented using dma_alloc_coherent() -- or perhaps a chip-specific
call to allocate from dedicated RAM -- and can thus return normal
cacheable buffers.  But if it uses DMA, that's not true.

Now "net2280.c" for example only has four DMA-capable endpoints,
(ep-a, ep-b, ep-c, ep-d), and buffers allocated for one of those
can be used with any of the other three.  (Iff you're willing to have
nonportable code in your gadget driver...)  It also has three PIO-only
endpoints (ep0, ep-e, ep-f) ... and buffers that are i/o coherent
with respect those will NOT be DMA-coherent on all platforms.

- Dave


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to