summaryrefslogtreecommitdiff
path: root/lib/swiotlb.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-10-31 07:17:34 (GMT)
committerDavid S. Miller <davem@davemloft.net>2008-10-31 07:17:34 (GMT)
commita1744d3bee19d3b9cbfb825ab316a101b9c9f109 (patch)
treec0e2324c09beca0eb5782eb5abf241ea2b7a4a11 /lib/swiotlb.c
parent275f165fa970174f8a98205529750e8abb6c0a33 (diff)
parenta432226614c5616e3cfd211e0acffa0acfb4770c (diff)
downloadlinux-a1744d3bee19d3b9cbfb825ab316a101b9c9f109.tar.xz
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts: drivers/net/wireless/p54/p54common.c
Diffstat (limited to 'lib/swiotlb.c')
-rw-r--r--lib/swiotlb.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/swiotlb.c b/lib/swiotlb.c
index f8eebd4..78330c3 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;