diff options
Diffstat (limited to 'lib/swiotlb.c')
-rw-r--r-- | lib/swiotlb.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/swiotlb.c b/lib/swiotlb.c index 7c06ee51a29a..93ca08b8a451 100644 --- a/lib/swiotlb.c +++ b/lib/swiotlb.c | |||
@@ -60,7 +60,7 @@ int swiotlb_force; | |||
60 | static char *io_tlb_start, *io_tlb_end; | 60 | static char *io_tlb_start, *io_tlb_end; |
61 | 61 | ||
62 | /* | 62 | /* |
63 | * The number of IO TLB blocks (in groups of 64) betweeen io_tlb_start and | 63 | * The number of IO TLB blocks (in groups of 64) between io_tlb_start and |
64 | * io_tlb_end. This is command line adjustable via setup_io_tlb_npages. | 64 | * io_tlb_end. This is command line adjustable via setup_io_tlb_npages. |
65 | */ | 65 | */ |
66 | static unsigned long io_tlb_nslabs; | 66 | static unsigned long io_tlb_nslabs; |
@@ -686,8 +686,10 @@ dma_addr_t swiotlb_map_page(struct device *dev, struct page *page, | |||
686 | /* | 686 | /* |
687 | * Ensure that the address returned is DMA'ble | 687 | * Ensure that the address returned is DMA'ble |
688 | */ | 688 | */ |
689 | if (!dma_capable(dev, dev_addr, size)) | 689 | if (!dma_capable(dev, dev_addr, size)) { |
690 | panic("map_single: bounce buffer is not DMA'ble"); | 690 | swiotlb_tbl_unmap_single(dev, map, size, dir); |
691 | dev_addr = swiotlb_virt_to_bus(dev, io_tlb_overflow_buffer); | ||
692 | } | ||
691 | 693 | ||
692 | return dev_addr; | 694 | return dev_addr; |
693 | } | 695 | } |