From: Greg Ungerer Date: Tue, 10 Jul 2012 03:50:58 +0000 (+1000) Subject: m68k: add support for DMA_BIDIRECTIONAL in dma support functions X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d2661c621525956dfdd1e66e1e4fd94b7e4b6ed5;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git m68k: add support for DMA_BIDIRECTIONAL in dma support functions The dma cache support functions do not currently support the direction flag DMA_BIDIRECTIONAL. If a driver passes this direction to dma_map_single or friends you will get console output like this: dma_sync_single_for_device: unsupported dir 0 For example when using the Intel e100 ethernet driver on a ColdFire platform with PCI bus. You will get a stream of these messages coming out. Modify the dma cache support code adding support for DMA_BIDIRECTIONAL. It is actioned by doing a cache push operation. Signed-off-by: Greg Ungerer --- diff --git a/arch/m68k/kernel/dma.c b/arch/m68k/kernel/dma.c index 27b5821f9712..e546a5534dd4 100644 --- a/arch/m68k/kernel/dma.c +++ b/arch/m68k/kernel/dma.c @@ -105,6 +105,7 @@ void dma_sync_single_for_device(struct device *dev, dma_addr_t handle, size_t size, enum dma_data_direction dir) { switch (dir) { + case DMA_BIDIRECTIONAL: case DMA_TO_DEVICE: cache_push(handle, size); break;