[2/5] switchtec: Set DMA coherent mask in Switchtec driver
diff mbox series

Message ID 1544433144-7563-3-git-send-email-wesley.sheng@microchip.com
State In Next
Commit aff614c6339c1ee2a74ea0afc491d6e30d0bad61
Headers show
  • Switchtec MRPC DMA mode support
Related show

Commit Message

Wesley Sheng Dec. 10, 2018, 9:12 a.m. UTC
From: Boris Glimcher <Boris.Glimcher@emc.com>

Switchtec hardware supports 64-bit DMA, 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>
Reviewed-by: Logan Gunthorpe <logang@deltatee.com>
 drivers/pci/switch/switchtec.c | 4 ++++
 1 file changed, 4 insertions(+)

diff mbox series

diff --git a/drivers/pci/switch/switchtec.c b/drivers/pci/switch/switchtec.c
index d2bca2d..480107e 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;
 	stdev->mmio = pcim_iomap_table(pdev)[0];