diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2010-05-11 17:06:43 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-11 20:33:41 -0400 |
commit | f33d7e2d2d113a63772bbc993cdec3b5327f0ef1 (patch) | |
tree | 1349305b4c3a39c87baab95beb05fa5b8dfc7750 /include | |
parent | fc2a093e7ad23e935aa29e349bc27173c92f1a95 (diff) |
dma-mapping: fix dma_sync_single_range_*
dma_sync_single_range_for_cpu() and dma_sync_single_range_for_device() use
a wrong address with a partial synchronization.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: <stable@kernel.org>
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/asm-generic/dma-mapping-common.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/asm-generic/dma-mapping-common.h b/include/asm-generic/dma-mapping-common.h index e694263445f7..69206957b72c 100644 --- a/include/asm-generic/dma-mapping-common.h +++ b/include/asm-generic/dma-mapping-common.h | |||
@@ -131,7 +131,7 @@ static inline void dma_sync_single_range_for_cpu(struct device *dev, | |||
131 | debug_dma_sync_single_range_for_cpu(dev, addr, offset, size, dir); | 131 | debug_dma_sync_single_range_for_cpu(dev, addr, offset, size, dir); |
132 | 132 | ||
133 | } else | 133 | } else |
134 | dma_sync_single_for_cpu(dev, addr, size, dir); | 134 | dma_sync_single_for_cpu(dev, addr + offset, size, dir); |
135 | } | 135 | } |
136 | 136 | ||
137 | static inline void dma_sync_single_range_for_device(struct device *dev, | 137 | static inline void dma_sync_single_range_for_device(struct device *dev, |
@@ -148,7 +148,7 @@ static inline void dma_sync_single_range_for_device(struct device *dev, | |||
148 | debug_dma_sync_single_range_for_device(dev, addr, offset, size, dir); | 148 | debug_dma_sync_single_range_for_device(dev, addr, offset, size, dir); |
149 | 149 | ||
150 | } else | 150 | } else |
151 | dma_sync_single_for_device(dev, addr, size, dir); | 151 | dma_sync_single_for_device(dev, addr + offset, size, dir); |
152 | } | 152 | } |
153 | 153 | ||
154 | static inline void | 154 | static inline void |