[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1542275044-10970-3-git-send-email-wesley.sheng@microchip.com>
Date: Thu, 15 Nov 2018 17:44:01 +0800
From: Wesley Sheng <wesley.sheng@...rochip.com>
To: <kurt.schwemmer@...rosemi.com>, <logang@...tatee.com>,
<bhelgaas@...gle.com>, <linux-pci@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
CC: <wesleyshenggit@...a.com>, <wesley.sheng@...rochip.com>
Subject: [PATCH 2/5] switchtec: Set DMA coherent mask in Switchtec driver
From: Boris Glimcher <Boris.Glimcher@....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@....com>
Signed-off-by: Wesley Sheng <wesley.sheng@...rochip.com>
---
drivers/pci/switch/switchtec.c | 4 ++++
1 file changed, 4 insertions(+)
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;
+
pci_set_master(pdev);
stdev->mmio = pcim_iomap_table(pdev)[0];
--
2.7.4
Powered by blists - more mailing lists