Re: [linux-usb-devel] DMA alignment requirements

2003-03-25 Thread David Brownell
Duncan Sands wrote: The potential issue with using unaligned buffers is related to DMA-incoherent caches. If you have data laid out in memory like this: // cache line starts here u8 cpu_writes_here_1 [size1]; u8 used_for_dma_read [dma_buflen]; u8 cpu_writes_here_2 [size2]; // c

Re: [linux-usb-devel] DMA alignment requirements

2003-03-25 Thread Duncan Sands
> The potential issue with using unaligned buffers is related > to DMA-incoherent caches. If you have data laid out in memory > like this: > > // cache line starts here > u8 cpu_writes_here_1 [size1]; > u8 used_for_dma_read [dma_buflen]; > u8 cpu_writes_here_2 [size2]; > /

Re: [linux-usb-devel] DMA alignment requirements

2003-03-11 Thread David Brownell
Oliver Neukum wrote: That means that you can't tell. So you must assume the worst. The only safe usage with kmalloced memory is to have exactly one buffer per kmalloced area and to start the buffer at offset 0. None of the host controller hardware has alignment restrictions for the start of DMA buf

Re: [linux-usb-devel] DMA alignment requirements

2003-03-11 Thread Oliver Neukum
Am Dienstag, 11. März 2003 16:43 schrieben Sie: > On Monday 10 March 2003 7:36 pm, Oliver Neukum wrote: > > Am Montag, 10. März 2003 13:59 schrieb Duncan Sands: > > > Hi all, must the transfer_buffer I provide with an urb be > > > aligned on, say, a double-word boundary or something like > > > that

Re: [linux-usb-devel] DMA alignment requirements

2003-03-11 Thread Duncan Sands
On Monday 10 March 2003 7:36 pm, Oliver Neukum wrote: > Am Montag, 10. März 2003 13:59 schrieb Duncan Sands: > > Hi all, must the transfer_buffer I provide with an urb be > > aligned on, say, a double-word boundary or something like > > that? > > The alignment requirements are specific to the hardw

Re: [linux-usb-devel] DMA alignment requirements

2003-03-10 Thread Matt Porter
On Mon, Mar 10, 2003 at 10:52:17AM -0800, Randy.Dunlap wrote: > On Mon, 10 Mar 2003 19:36:04 +0100 Oliver Neukum <[EMAIL PROTECTED]> wrote: > > | Am Montag, 10. März 2003 13:59 schrieb Duncan Sands: > | > Hi all, must the transfer_buffer I provide with an urb be > | > aligned on, say, a double-wor

Re: [linux-usb-devel] DMA alignment requirements

2003-03-10 Thread Randy.Dunlap
On Mon, 10 Mar 2003 19:36:04 +0100 Oliver Neukum <[EMAIL PROTECTED]> wrote: | Am Montag, 10. März 2003 13:59 schrieb Duncan Sands: | > Hi all, must the transfer_buffer I provide with an urb be | > aligned on, say, a double-word boundary or something like | > that? | | The alignment requirements a

Re: [linux-usb-devel] DMA alignment requirements

2003-03-10 Thread Oliver Neukum
Am Montag, 10. März 2003 13:59 schrieb Duncan Sands: > Hi all, must the transfer_buffer I provide with an urb be > aligned on, say, a double-word boundary or something like > that? The alignment requirements are specific to the hardware that happens to be used. kmalloc() will return properly align

[linux-usb-devel] DMA alignment requirements

2003-03-10 Thread Duncan Sands
Hi all, must the transfer_buffer I provide with an urb be aligned on, say, a double-word boundary or something like that? Thanks, Duncan. --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _