If the DMA IOMMU path is going to be used, the appropriate check should
return that DMA is supported.
Fixes: b5c58b2fdc42 ("dma-mapping: direct calls for dma-iommu")
Closes: https://lore.kernel.org/all/181e06ff-35a3-434f-b505-672f430bd1cb@notapiano
Reported-by: NĂcolas F. R. A. Prado <[email protected]> #KernelCI
Signed-off-by: Leon Romanovsky <[email protected]>
Reviewed-by: Robin Murphy <[email protected]>
Tested-by: NĂcolas F. R. A. Prado <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
if (WARN_ON(ops && use_dma_iommu(dev)))
return false;
+
+ if (use_dma_iommu(dev))
+ return true;
/*
* ->dma_supported sets the bypass flag, so we must always call
* into the method here unless the device is truly direct mapped.