[PATCH 01/12] PCI/switchtec: Use dma_set_mask_and_coherent()

From: Logan Gunthorpe
Date: Mon Jan 06 2020 - 14:03:47 EST


From: Wesley Sheng <wesley.sheng@xxxxxxxxxxxxx>

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.

Fixes: aff614c6339c ("switchtec: Set DMA coherent mask")
Signed-off-by: Wesley Sheng <wesley.sheng@xxxxxxxxxxxxx>
[logang@xxxxxxxxxxxx: reworked commit message]
Signed-off-by: Logan Gunthorpe <logang@xxxxxxxxxxxx>
---
drivers/pci/switch/switchtec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pci/switch/switchtec.c b/drivers/pci/switch/switchtec.c
index 88091bbfe77f..2bf670977b9c 100644
--- a/drivers/pci/switch/switchtec.c
+++ b/drivers/pci/switch/switchtec.c
@@ -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;

--
2.20.1