X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=lib%2Fswiotlb.c;h=93ca08b8a451411c3c4ac18f1f9525637e4a7140;hb=91f017372a48d2d128d08964bcfeafbd98b6d739;hp=c47bbe11b804e1aa9e0084eeb73e402cbaea04b9;hpb=d73b388459b1ee2e80f8ff9c1916d75640d7d920;p=mv-sheeva.git diff --git a/lib/swiotlb.c b/lib/swiotlb.c index c47bbe11b80..93ca08b8a45 100644 --- a/lib/swiotlb.c +++ b/lib/swiotlb.c @@ -686,8 +686,10 @@ dma_addr_t swiotlb_map_page(struct device *dev, struct page *page, /* * Ensure that the address returned is DMA'ble */ - if (!dma_capable(dev, dev_addr, size)) - panic("map_single: bounce buffer is not DMA'ble"); + if (!dma_capable(dev, dev_addr, size)) { + swiotlb_tbl_unmap_single(dev, map, size, dir); + dev_addr = swiotlb_virt_to_bus(dev, io_tlb_overflow_buffer); + } return dev_addr; }