PCI/switchtec: Use dma_set_mask_and_coherent()
authorWesley Sheng <wesley.sheng@microchip.com>
Mon, 6 Jan 2020 19:03:26 +0000 (12:03 -0700)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 8 Jan 2020 21:42:45 +0000 (15:42 -0600)
Use dma_set_mask_and_coherent() instead of dma_set_coherent_mask() as the
Switchtec hardware fully supports 64bit addressing and we should set both
the streaming and coherent masks the same.

[logang@deltatee.com: reworked commit message]
Fixes: aff614c6339c ("switchtec: Set DMA coherent mask")
Link: https://lore.kernel.org/r/20200106190337.2428-2-logang@deltatee.com
Signed-off-by: Wesley Sheng <wesley.sheng@microchip.com>
Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
drivers/pci/switch/switchtec.c

index 88091bb..2bf6709 100644 (file)
@@ -1349,7 +1349,7 @@ static int switchtec_init_pci(struct switchtec_dev *stdev,
        if (rc)
                return rc;
 
-       rc = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(64));
+       rc = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
        if (rc)
                return rc;