Re: [RFC PATCH 1/2] USB: add HCD_BOUNCE_BUFFERS host controller driver flag

2010-02-07 Thread Albert Herranz
Alan Stern wrote: On a 64-bit processor, some of the accesses will be 64 bits wide instead of 32. Does that matter for your purposes? The wii uses a 32-bit processor, so this is safe in this case. What about ohci-hcd and uhci-hcd? They both use non-32-bit accesses to structures in coherent

Re: [RFC PATCH 1/2] USB: add HCD_BOUNCE_BUFFERS host controller driver flag

2010-02-07 Thread Alan Stern
On Sun, 7 Feb 2010, Albert Herranz wrote: The wii has no uhci, but has 2 ohci controllers. For ohci we need a similar approach as done for ehci. So you'll need to write a patch splitting up the OHCI data structures in the same way the EHCI qh was split up. If you do it as described above

Re: [RFC PATCH 1/2] USB: add HCD_BOUNCE_BUFFERS host controller driver flag

2010-02-07 Thread Albert Herranz
Alan Stern wrote: On Sun, 7 Feb 2010, Albert Herranz wrote: The wii has no uhci, but has 2 ohci controllers. For ohci we need a similar approach as done for ehci. So you'll need to write a patch splitting up the OHCI data structures in the same way the EHCI qh was split up. Yes. It

Re: [RFC PATCH 1/2] USB: add HCD_BOUNCE_BUFFERS host controller driver flag

2010-02-04 Thread Albert Herranz
Hi Alan, Alan Stern wrote: This description sounds hopelessly confused. Maybe you're just misusing the term coherent. The patch itself doesn't affect the coherent DMA mappings anyway; it affects the streaming mappings. Or to put it another way, what's the justification for replacing a call

Re: [RFC PATCH 1/2] USB: add HCD_BOUNCE_BUFFERS host controller driver flag

2010-02-04 Thread Alan Stern
On Thu, 4 Feb 2010, Albert Herranz wrote: Hi Alan, Alan Stern wrote: This description sounds hopelessly confused. Maybe you're just misusing the term coherent. The patch itself doesn't affect the coherent DMA mappings anyway; it affects the streaming mappings. Or to put it another

[RFC PATCH 1/2] USB: add HCD_BOUNCE_BUFFERS host controller driver flag

2010-02-03 Thread Albert Herranz
The HCD_BOUNCE_BUFFERS USB host controller driver flag can be enabled to instruct the USB stack to always bounce USB buffers to/from coherent memory buffers _just_ before/after a host controller transmission. This setting allows overcoming some platform-specific limitations. For example, the

Re: [RFC PATCH 1/2] USB: add HCD_BOUNCE_BUFFERS host controller driver flag

2010-02-03 Thread Greg KH
On Wed, Feb 03, 2010 at 07:30:39PM +0100, Albert Herranz wrote: +/** + * hcd_memcpy32_to_coherent - copy data to a bounce buffer + * @dst: destination dma bounce buffer + * @src: source buffer + * @len: number of bytes to copy + * + * This function copies @len bytes from @src to @dst in 32