Re: Possible discrepancy regarding streaming DMA mappings in DMA-mapping.txt?

William Jhun (wjhun@ayrnetworks.com)
Fri, 24 May 2002 13:58:42 -0700


On Fri, May 24, 2002 at 01:26:41PM -0700, David S. Miller wrote:
>
> I know what you're trying to do, but I'm going to tell you upfront
> that this will make the existing case much more inefficient than
> it needs to be.

Sorry, I'm not clear on this one. I was first proposing (for the short
term, at least) to not change anything at all: all the existing
implementations of pci_dma_sync_*(..., PCIDMA_TO_DEVICE) already do what
is required: prepare the buffer to be DMAed from by the controller. Most
drivers won't have to deal with this; most network drivers, for example,
do a pci_map_*() on an skb passed down from the stack and subsequently
pci_unmap_*() those buffers once transmitted, thus having no need for
pci_dma_sync_*()... So I don't see how this makes anything else less
efficient...

>
> Please, add a new call to handle your case. Thanks.

Such a call would do what pci_dma_sync_*(..., PCIDMA_TO_DEVICE) already
does (unless that is what you want - to have a new call just for the
sake of clarity...).

Thanks,
William
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/