Re: gadget framework data alignment

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

 



On Tue, 15 Dec 2009, Matthieu CASTET wrote:

> Hi,
> 
> 
> I am wondering about using dma with gadget.
> 
> From what I understand gadget function can put anything in req->buf.
> That is the case for u_ether that puts skb->data.
> 
> But if the driver wants to do dma they need a buffer aligned on a cache
> boundary (to clean/invalidate/flush buffer).
> 
> Who should do the job ?
> - Gadget function should provide "provide DMA-safe buffers" like in spi
> subsystem ?
> - Driver need to copy the data in a safe buffer.

Buffers should be allocated by calling kmalloc() or equivalent 
functions.  These routines always return addresses that are 
cacheline-aligned on architectures which require it.

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