summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWesley Sheng <wesley.sheng@microchip.com>2020-01-06 12:03:26 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-02-14 16:34:09 -0500
commitb72b8d0725b0fa3d6ae991824be7df74ecf8077f (patch)
treee9e2e3e6daffe73c084fe95fbb3eb50b777ed68c
parent15818c08ca79d3798da9e9f0225026abc47a379a (diff)
downloadlinux-stable-b72b8d0725b0fa3d6ae991824be7df74ecf8077f.tar.gz
linux-stable-b72b8d0725b0fa3d6ae991824be7df74ecf8077f.tar.bz2
linux-stable-b72b8d0725b0fa3d6ae991824be7df74ecf8077f.zip
PCI/switchtec: Use dma_set_mask_and_coherent()
commit aa82130a22f77c1aa5794703730304d035a0c1f4 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/pci/switch/switchtec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pci/switch/switchtec.c b/drivers/pci/switch/switchtec.c
index 465d6afd826e..1bb3dcf3d7a2 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;