summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-11-19 17:35:36 +0100
committerChristoph Hellwig <hch@lst.de>2019-11-20 20:31:41 +0100
commit4268ac6ae5870af10a7417b22990d615f72f77e2 (patch)
tree4f50419289b7d2e946c5ad499d040a5a9ae27449
parent50f579a2399dee0ad1c86ea8159ab8657b74f95b (diff)
downloadlinux-4268ac6ae5870af10a7417b22990d615f72f77e2.tar.bz2
dma-direct: don't check swiotlb=force in dma_direct_map_resource
When mapping resources we can't just use swiotlb ram for bounce buffering. Switch to a direct dma_capable check instead. Fixes: cfced786969c ("dma-mapping: remove the default map_resource implementation") Reported-by: Robin Murphy <robin.murphy@arm.com> Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Marek Szyprowski <m.szyprowski@samsung.com> Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
-rw-r--r--kernel/dma/direct.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/dma/direct.c b/kernel/dma/direct.c
index 077876ae5c74..a479bd2d1e8b 100644
--- a/kernel/dma/direct.c
+++ b/kernel/dma/direct.c
@@ -412,7 +412,7 @@ dma_addr_t dma_direct_map_resource(struct device *dev, phys_addr_t paddr,
{
dma_addr_t dma_addr = paddr;
- if (unlikely(!dma_direct_possible(dev, dma_addr, size))) {
+ if (unlikely(!dma_capable(dev, dma_addr, size))) {
report_addr(dev, dma_addr, size);
return DMA_MAPPING_ERROR;
}