Skip to content

Commit

Permalink
ntb: hw: remove the code that sets the DMA mask
Browse files Browse the repository at this point in the history
This patch removes the code that sets the DMA mask as it no longer
makes sense to do this.

Fixes: 7f46c8b ("NTB: ntb_tool: Add full multi-port NTB API support")
Signed-off-by: Logan Gunthorpe <[email protected]>
Tested-by: Alexander Fomichev <[email protected]>
Signed-off-by: Sanjay R Mehta <[email protected]>
Signed-off-by: Jon Mason <[email protected]>
  • Loading branch information
lsgunth authored and jonmason committed Jun 6, 2020
1 parent 46f21af commit f80fe89
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 14 deletions.
4 changes: 0 additions & 4 deletions drivers/ntb/hw/amd/ntb_hw_amd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
6 changes: 0 additions & 6 deletions drivers/ntb/hw/idt/ntb_hw_idt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions drivers/ntb/hw/intel/ntb_hw_gen1.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit f80fe89

Please sign in to comment.