Commit 4c15c243 authored by Russell King's avatar Russell King

DMA-API: net: emulex/benet: replace dma_set_mask()+dma_set_coherent_mask() with new helper

Replace the following sequence:

	dma_set_mask(dev, mask);
	dma_set_coherent_mask(dev, mask);

with a call to the new helper dma_set_mask_and_coherent().
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 1bfa2c40
...@@ -4335,19 +4335,11 @@ static int be_probe(struct pci_dev *pdev, const struct pci_device_id *pdev_id) ...@@ -4335,19 +4335,11 @@ static int be_probe(struct pci_dev *pdev, const struct pci_device_id *pdev_id)
adapter->netdev = netdev; adapter->netdev = netdev;
SET_NETDEV_DEV(netdev, &pdev->dev); SET_NETDEV_DEV(netdev, &pdev->dev);
status = dma_set_mask(&pdev->dev, DMA_BIT_MASK(64)); status = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
if (!status) { if (!status) {
status = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(64));
if (status < 0) {
dev_err(&pdev->dev, "dma_set_coherent_mask failed\n");
goto free_netdev;
}
netdev->features |= NETIF_F_HIGHDMA; netdev->features |= NETIF_F_HIGHDMA;
} else { } else {
status = dma_set_mask(&pdev->dev, DMA_BIT_MASK(32)); status = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
if (!status)
status = dma_set_coherent_mask(&pdev->dev,
DMA_BIT_MASK(32));
if (status) { if (status) {
dev_err(&pdev->dev, "Could not set PCI DMA Mask\n"); dev_err(&pdev->dev, "Could not set PCI DMA Mask\n");
goto free_netdev; goto free_netdev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment