Google
  Web www.spinics.net

Re: [PATCH][1/4] usb: dma bounce buffer support using HCD_BOUNCE flag

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


For what it's worth, the SA1111 has a somewhat similar requirement
coming from a DMA erratum that makes every other megabyte invalid
in terms of DMA addressing.  So it does bounce buffering ... but
it's done transparently to usbcore, in its DMA mapping operations.

Could you talk a bit more about why that approach isn't appropriate
here?  My first guess would be that it just costs too much, and
this is used on systems without manny spare resources.  Including
for example ones where the memcpy overheads would hurt battery
lifetimes, even if there were spare CPU cycles.

ISTR this specific issue (needing memory from a particular area) came
up on some of the Philips/NXP chips and some other hardware too.  But:


> --- 0001/drivers/usb/core/hcd.h
> +++ work/drivers/usb/core/hcd.h	2008-01-13 19:54:10.000000000 +0900
> @@ -165,6 +165,7 @@ struct hc_driver {
>  
>  	int	flags;
>  #define	HCD_MEMORY	0x0001		/* HC regs use memory (else I/O) */
> +#define	HCD_BOUNCE	0x0002		/* HC needs bounce buffers */

I think this makes "bounce buffers" become a too-overloaded term.

These are most certainly bounce buffers ... but the significance
isn't that detail, but a different one:  that they're HC-local
memory.  That is, normal bounce buffers couldn't do the job.

If the normal bounce buffer logic is inappropriate, then I'd suggest
coming up with a less generic term and symbol.  Maybe HCD_LOCAL_MEM
would capture all the relevant details.

- Dave


>  #define	HCD_USB11	0x0010		/* USB 1.1 */
>  #define	HCD_USB2	0x0020		/* USB 2.0 */
>  

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
linux-usb-devel@xxxxxxxxxxxxxxxxxxxxx
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

[Home]     [Video for Linux]     [Photo]     [Yosemite Forum]     [Yosemite Photos]    [Video Projectors]     [PDAs]     [Hacking TiVo]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Devices]     [Big List of Linux Books]     [Free Dating]

  Powered by Linux