Skip to content

Commit

Permalink
net: systemport: Set correct DMA mask
Browse files Browse the repository at this point in the history
SYSTEMPORT is capabable of doing up to 40-bit of physical addresses, set
an appropriate DMA mask to permit that.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Florian Fainelli authored and David S. Miller committed Dec 20, 2019
1 parent 5f04a6d commit d63b542
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/net/ethernet/broadcom/bcmsysport.c
Original file line number Diff line number Diff line change
Expand Up @@ -2427,6 +2427,14 @@ static int bcm_sysport_probe(struct platform_device *pdev)
if (!of_id || !of_id->data)
return -EINVAL;

ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(40));
if (ret)
ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
if (ret) {
dev_err(&pdev->dev, "unable to set DMA mask: %d\n", ret);
return ret;
}

/* Fairly quickly we need to know the type of adapter we have */
params = of_id->data;

Expand Down

0 comments on commit d63b542

Please sign in to comment.