I think I'll sign off on this as-is.
On Wednesday 16 May 2007, HÃ¥vard Skinnemoen wrote: > On 5/16/07, David Brownell <[EMAIL PROTECTED]> wrote: > > It's legit to set up cpu-virtual (for PIO) and dma addresses > > for each buffer, since the upper layer driver has no way to > > know if the underlying controller driver is DMA-capable, or > > for that matter PIO-capable. > > Yes, but are there any drivers that will provide a valid dma address > and a NULL cpu-virtual pointer? Potentially. One scenario would be a block driver, which needs to work with scatterlists. dma_map_sg() is allowed to coalesce the scatterlist entries, as with an IOMMU. If it does that, there can no longer be a one-to-one linkage between addreses provided to that driver, and the dma addresess. (Likewise, addresses in HIGHMEM are not normally going to have kernel virtual addresses.) So providing both types of address is no longer practical with scatterlists. > That would indeed break my > assumptions, but it would also break any PIO-only drivers, wouldn't > it? Which is exactly why the current "mmc_spi" code doesn't use the dma_map_sg() interface. Instead, it goes in more byte-size chunks, taking care to provide both dma and pio addresses. It's a PITA, but at least it's coded now. - Dave > Haavard > - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/