diff options
author | Alexandros C. Couloumbis <alex@ozo.com> | 2010-09-29 13:50:16 +0000 |
---|---|---|
committer | Alexandros C. Couloumbis <alex@ozo.com> | 2010-09-29 13:50:16 +0000 |
commit | e7f5e132303c22708658ab2041af9dead43bf3a5 (patch) | |
tree | f633e6d16ed599edacdf627c82cddbacc9b4d99a /target | |
parent | 51822a0566f44bdf6e03f472904bc688d27224ac (diff) | |
download | upstream-e7f5e132303c22708658ab2041af9dead43bf3a5.tar.gz upstream-e7f5e132303c22708658ab2041af9dead43bf3a5.tar.bz2 upstream-e7f5e132303c22708658ab2041af9dead43bf3a5.zip |
linux/ixp4xx: sync 2.6.36 patches to 2.6.36-rc6
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23150 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target')
-rw-r--r-- | target/linux/ixp4xx/patches-2.6.36/050-disable_dmabounce.patch | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/target/linux/ixp4xx/patches-2.6.36/050-disable_dmabounce.patch b/target/linux/ixp4xx/patches-2.6.36/050-disable_dmabounce.patch index 4652a4fc60..33509baa2b 100644 --- a/target/linux/ixp4xx/patches-2.6.36/050-disable_dmabounce.patch +++ b/target/linux/ixp4xx/patches-2.6.36/050-disable_dmabounce.patch @@ -119,3 +119,30 @@ #define ISA_DMA_THRESHOLD (SZ_64M - 1) #define MAX_DMA_ADDRESS (PAGE_OFFSET + SZ_64M) +--- a/arch/arm/common/dmabounce.c ++++ b/arch/arm/common/dmabounce.c +@@ -30,6 +30,7 @@ + #include <linux/dma-mapping.h> + #include <linux/dmapool.h> + #include <linux/list.h> ++#include <linux/pci.h> + #include <linux/scatterlist.h> + + #include <asm/cacheflush.h> +@@ -248,8 +249,15 @@ static inline dma_addr_t map_single(stru + needs_bounce = (dma_addr | (dma_addr + size - 1)) & ~mask; + } + +- if (device_info && (needs_bounce || dma_needs_bounce(dev, dma_addr, size))) { ++#ifdef CONFIG_DMABOUNCE ++int dma_needs_bounce_2(struct device *dev, dma_addr_t dma_addr, size_t size) ++{ ++ return (dev->bus == &pci_bus_type ) && ((dma_addr + size) > SZ_64M); ++} ++ ++ if (device_info && (needs_bounce || dma_needs_bounce_2(dev, dma_addr, size))) { + struct safe_buffer *buf; ++#endif + + buf = alloc_safe_buffer(device_info, ptr, size, dir); + if (buf == 0) { |