summaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorBoris Glimcher <Boris.Glimcher@emc.com>2018-12-10 10:12:21 +0100
committerBjorn Helgaas <bhelgaas@google.com>2018-12-12 23:31:54 +0100
commitaff614c6339c1ee2a74ea0afc491d6e30d0bad61 (patch)
treec6925ee9e576627f085c3af80723f2373a3e635e /drivers/pci
parentswitchtec: Remove immediate status check after submitting MRPC command (diff)
downloadlinux-aff614c6339c1ee2a74ea0afc491d6e30d0bad61.tar.xz
linux-aff614c6339c1ee2a74ea0afc491d6e30d0bad61.zip
switchtec: Set DMA coherent mask
Switchtec hardware supports 64-bit DMA, so set the correct DMA mask. This allows the CMA to allocate larger buffers for memory windows. Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com> Signed-off-by: Wesley Sheng <wesley.sheng@microchip.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/switch/switchtec.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/pci/switch/switchtec.c b/drivers/pci/switch/switchtec.c
index d2bca2dd9889..480107ecb2ab 100644
--- a/drivers/pci/switch/switchtec.c
+++ b/drivers/pci/switch/switchtec.c
@@ -1237,6 +1237,10 @@ static int switchtec_init_pci(struct switchtec_dev *stdev,
if (rc)
return rc;
+ rc = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(64));
+ if (rc)
+ return rc;
+
pci_set_master(pdev);
stdev->mmio = pcim_iomap_table(pdev)[0];