ntb: hw: remove the code that sets the DMA mask
authorLogan Gunthorpe <logang@deltatee.com>
Wed, 6 May 2020 04:21:48 +0000 (23:21 -0500)
committerJon Mason <jdmason@kudzu.us>
Sat, 6 Jun 2020 00:02:08 +0000 (20:02 -0400)
This patch removes the code that sets the DMA mask as it no longer
makes sense to do this.

Fixes: 7f46c8b3a552 ("NTB: ntb_tool: Add full multi-port NTB API support")
Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Tested-by: Alexander Fomichev <fomichev.ru@gmail.com>
Signed-off-by: Sanjay R Mehta <sanju.mehta@amd.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
drivers/ntb/hw/amd/ntb_hw_amd.c
drivers/ntb/hw/idt/ntb_hw_idt.c
drivers/ntb/hw/intel/ntb_hw_gen1.c

index 9e310e1..88e1db6 100644 (file)
@@ -1191,10 +1191,6 @@ static int amd_ntb_init_pci(struct amd_ntb_dev *ndev,
                        goto err_dma_mask;
                dev_warn(&pdev->dev, "Cannot DMA consistent highmem\n");
        }
-       rc = dma_coerce_mask_and_coherent(&ndev->ntb.dev,
-                                         dma_get_mask(&pdev->dev));
-       if (rc)
-               goto err_dma_mask;
 
        ndev->self_mmio = pci_iomap(pdev, 0, 0);
        if (!ndev->self_mmio) {
index edae523..d54261f 100644 (file)
@@ -2660,12 +2660,6 @@ static int idt_init_pci(struct idt_ntb_dev *ndev)
                dev_warn(&pdev->dev,
                        "Cannot set consistent DMA highmem bit mask\n");
        }
-       ret = dma_coerce_mask_and_coherent(&ndev->ntb.dev,
-                                          dma_get_mask(&pdev->dev));
-       if (ret != 0) {
-               dev_err(&pdev->dev, "Failed to set NTB device DMA bit mask\n");
-               return ret;
-       }
 
        /*
         * Enable the device advanced error reporting. It's not critical to
index cae70e7..423f9b8 100644 (file)
@@ -1786,10 +1786,6 @@ static int intel_ntb_init_pci(struct intel_ntb_dev *ndev, struct pci_dev *pdev)
                        goto err_dma_mask;
                dev_warn(&pdev->dev, "Cannot DMA consistent highmem\n");
        }
-       rc = dma_coerce_mask_and_coherent(&ndev->ntb.dev,
-                                         dma_get_mask(&pdev->dev));
-       if (rc)
-               goto err_dma_mask;
 
        ndev->self_mmio = pci_iomap(pdev, 0, 0);
        if (!ndev->self_mmio) {