On Monday 02 July 2007, Oliver Neukum wrote: > Am Montag, 2. Juli 2007 schrieb David Brownell: > > On Monday 02 July 2007, Oliver Neukum wrote: > > > > > And please explain why we can operate efficiently with kmalloced > > > memory although we don't evaluate the controller's dma mask. > > > > In what way does that relate to anything I updated? Looks like > > you want me to introduce a new topic, which hasn't been raised > > before as a point of confusion ... > > You are mentioning the DMA bounce buffers and therewith the dma mask:
You're reading rather a lot into that. Remember that one of the canonical cases where bounce buffers are needed is the SA1111 DMA controller -- where an erratum prevents every other megabyte from being usable for DMA -- and the dma mask infrastructure doesn't handle that "can't use that address line" case at all. I'm not going to go into that. It's already complex enough, and the rules in general are so arbitrary that trying to explain the dma mask crap as if it were sensible is utterly hopeless. > + For those specific cases, USB has primitives to allocate less expensive > + memory. They work like kmalloc and kfree versions that give you the right > kind of addresses to store in urb->transfer_buffer and urb->transfer_dma, > while guaranteeing that no hidden copies through DMA "bounce" buffers will > slow things down. You'd also set URB_NO_TRANSFER_DMA_MAP in > > In other words, the first part of the text tells you that there is an API > that has benefits A & B. Later it says that it has a disadvantage that > usually outweighs benefit B. But benefit A is not mentioned. > This doesn't add up. Actually it doesn't mention either A or B ... it just says that most drivers don't need to use dma-coherent memory. (After accounting for previous feedback.) So I can't accept that as valid feedback -- sorry. - Dave ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel