From: Boris Glimcher Date: Mon, 10 Dec 2018 09:12:21 +0000 (+0800) Subject: switchtec: Set DMA coherent mask X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=aff614c6339c1ee2a74ea0afc491d6e30d0bad61;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: Wesley Sheng Signed-off-by: Bjorn Helgaas Reviewed-by: Logan Gunthorpe --- 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];