summaryrefslogtreecommitdiffstats
path: root/drivers/pci/pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/pci.c')
-rw-r--r--drivers/pci/pci.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
index b2d23d1b0d41..929fd3932032 100644
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -2315,12 +2315,11 @@ pci_set_dma_mask(struct pci_dev *dev, u64 mask)
int
pci_set_consistent_dma_mask(struct pci_dev *dev, u64 mask)
{
- if (!pci_dma_supported(dev, mask))
- return -EIO;
+ int ret = dma_set_coherent_mask(&dev->dev, mask);
+ if (ret)
+ return ret;
- dev->dev.coherent_dma_mask = mask;
dev_dbg(&dev->dev, "using %dbit consistent DMA mask\n", fls64(mask));
-
return 0;
}
#endif
OpenPOWER on IntegriCloud