aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/dma-direct.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/dma-direct.c b/lib/dma-direct.c
index b824eb218782..a48f94eff62e 100644
--- a/lib/dma-direct.c
+++ b/lib/dma-direct.c
@@ -172,6 +172,12 @@ int dma_direct_supported(struct device *dev, u64 mask)
if (mask < DMA_BIT_MASK(32))
return 0;
#endif
+ /*
+ * Various PCI/PCIe bridges have broken support for > 32bit DMA even
+ * if the device itself might support it.
+ */
+ if (dev->dma_32bit_limit && mask > DMA_BIT_MASK(32))
+ return 0;
return 1;
}