diff options
author | Ben Dooks <ben-linux@fluff.org> | 2008-10-30 10:26:11 +0000 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2008-10-30 10:26:11 +0000 |
commit | 2231b3729eb92f163bbe64b604410ee451b2c42b (patch) | |
tree | 4b4043cda9bfcf0912839edbb64484763853bd33 /lib/swiotlb.c | |
parent | b99053eefce89c5c8500517f5f065c85b57d98ee (diff) | |
parent | e946217e4fdaa67681bbabfa8e6b18641921f750 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into s3c64xx
Diffstat (limited to 'lib/swiotlb.c')
-rw-r--r-- | lib/swiotlb.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/swiotlb.c b/lib/swiotlb.c index f8eebd48914..78330c37a61 100644 --- a/lib/swiotlb.c +++ b/lib/swiotlb.c @@ -497,8 +497,10 @@ swiotlb_alloc_coherent(struct device *hwdev, size_t size, printk("hwdev DMA mask = 0x%016Lx, dev_addr = 0x%016Lx\n", (unsigned long long)*hwdev->dma_mask, (unsigned long long)dev_addr); - panic("swiotlb_alloc_coherent: allocated memory is out of " - "range for device"); + + /* DMA_TO_DEVICE to avoid memcpy in unmap_single */ + unmap_single(hwdev, ret, size, DMA_TO_DEVICE); + return NULL; } *dma_handle = dev_addr; return ret; |