aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2010-09-22 16:04:55 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-09-22 20:22:38 -0400
commit710224fa2750cf449c02dd115548acebfdd2c86a (patch)
tree3caa498384daec3b2e40adb4a89d7f854f2adb7c /include
parentc227e69028473c7c7994a9b0a2cc0034f3f7e0fe (diff)
arm: fix "arm: fix pci_set_consistent_dma_mask for dmabounce devices"
This fixes the regression caused by the commit 6fee48cd330c68 ("dma-mapping: arm: use generic pci_set_dma_mask and pci_set_consistent_dma_mask"). ARM needs to clip the dma coherent mask for dmabounce devices. This restores the old trick. Note that strictly speaking, the DMA API doesn't allow architectures to do such but I'm not sure it's worth adding the new API to set the dma mask that allows architectures to clip it. Reported-by: Krzysztof Halasa <khc@pm.waw.pl> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/dma-mapping.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h
index ce29b8151198..ba8319ae5fcc 100644
--- a/include/linux/dma-mapping.h
+++ b/include/linux/dma-mapping.h
@@ -102,6 +102,9 @@ static inline u64 dma_get_mask(struct device *dev)
102 return DMA_BIT_MASK(32); 102 return DMA_BIT_MASK(32);
103} 103}
104 104
105#ifdef ARCH_HAS_DMA_SET_COHERENT_MASK
106int dma_set_coherent_mask(struct device *dev, u64 mask);
107#else
105static inline int dma_set_coherent_mask(struct device *dev, u64 mask) 108static inline int dma_set_coherent_mask(struct device *dev, u64 mask)
106{ 109{
107 if (!dma_supported(dev, mask)) 110 if (!dma_supported(dev, mask))
@@ -109,6 +112,7 @@ static inline int dma_set_coherent_mask(struct device *dev, u64 mask)
109 dev->coherent_dma_mask = mask; 112 dev->coherent_dma_mask = mask;
110 return 0; 113 return 0;
111} 114}
115#endif
112 116
113extern u64 dma_get_required_mask(struct device *dev); 117extern u64 dma_get_required_mask(struct device *dev);
114 118