Re: [PATCH 1/2] USB: Allow HCDs to specifiy their DMA alignment requirements

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 1 Sep 2010, David Vrabel wrote:

> On 01/09/2010 09:18, Oliver Neukum wrote:
> > 
> > 1. Drivers mapping their own buffers.
> > The problem here is that I am not sure we have a valid pointer
> > which can support a copy to a bounce buffer.
> 
> I don't see why drivers need to map their own buffers or use coherent
> allocations. Should this ability be removed?   It doesn't play nice with
> usbmon or drivers needing to do PIO either.

It should work okay for usbmon and PIO.  The buffers returned by
usb_alloc_coherent() are always CPU-addressable.  No, the problems with
usbmon and PIO occur when drivers use the scatter-gather interface.  
Then there _is_ no buffer pointer, just a page and a DMA address.

We use coherent buffers only for the benefit of driver that need to do
a lot of rapid I/O repeatedly using the same buffer.  Removing them
would slow such drivers down a little -- I don't know how much.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux