On Sun, 30 Jul 2006, David Brownell wrote:

> > It's documented in usb.c:usb_buffer_alloc.  Obviously the idea is to map a
> > frequently-used DMA buffer just once instead of over and over.
> 
> Erm, no ... buffer allocation and buffer mapping are distinct operations,
> that one only affects allocation.

Right.  I should have said: "The idea is to allocate a frequently-used DMA
buffer in a DMA-consistent memory area and thereby avoid the need to map
it over and over."

> Note by the way that recent kernels added a new dma operation:
> 
>       dma_mapping_error(dma_addr_t)
> 
> returns boolean ... finally, it's at least possible to report mapping
> errors, alhough the invalid DMA address is still arch-specific (and usually
> all-ones).

However hcd_buffer_alloc doesn't use the arch-specific value.  It's 
hard-coded to all-ones.

It's also worth pointing out that there is now a dma_supported() routine.  
We could start using it.

> > Are you asking why the method is per-bus?  I don't know; the current 
> > implementation doesn't use this feature.
> 
> At least sl811-hcd could use it, and in general the dma issues need
> to be tied to the underlying usb_bus not a usb_device since that's how
> the operations work.

What could the HCDs do that would be any better than hcd_buffer_alloc?

Alan Stern


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
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