diff options
| author | 2008-11-10 09:16:27 +0100 | |
|---|---|---|
| committer | 2008-11-10 09:16:27 +0100 | |
| commit | 4ecd33d930591d41fe356160593a9076467b961c (patch) | |
| tree | b9051a334540bbce38db1b2b03cebb4cf1d51f73 /lib/swiotlb.c | |
| parent | x86, NMI watchdog: disable NMIs on LVT0 in case NMI watchdog is not working (diff) | |
| parent | Linux 2.6.28-rc4 (diff) | |
| download | linux-dev-4ecd33d930591d41fe356160593a9076467b961c.tar.xz linux-dev-4ecd33d930591d41fe356160593a9076467b961c.zip | |
Merge commit 'v2.6.28-rc4' into x86/apic
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 f8eebd489149..78330c37a61b 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; |
