Commit c5c177c5 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'dma-mapping-4.17-2' of git://git.infradead.org/users/hch/dma-mapping

Pull dma-mapping fix from Christoph Hellwig:
 "Fix for one swiotlb regression in 2.16 from Takashi"

* tag 'dma-mapping-4.17-2' of git://git.infradead.org/users/hch/dma-mapping:
  swiotlb: fix unexpected swiotlb_alloc_coherent failures
parents d1cb7718 9e7f06c8
...@@ -719,7 +719,7 @@ swiotlb_alloc_buffer(struct device *dev, size_t size, dma_addr_t *dma_handle, ...@@ -719,7 +719,7 @@ swiotlb_alloc_buffer(struct device *dev, size_t size, dma_addr_t *dma_handle,
goto out_warn; goto out_warn;
*dma_handle = __phys_to_dma(dev, phys_addr); *dma_handle = __phys_to_dma(dev, phys_addr);
if (dma_coherent_ok(dev, *dma_handle, size)) if (!dma_coherent_ok(dev, *dma_handle, size))
goto out_unmap; goto out_unmap;
memset(phys_to_virt(phys_addr), 0, size); memset(phys_to_virt(phys_addr), 0, size);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment