diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2019-12-18 01:29:50 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-12-20 03:09:59 +0100 |
commit | d63b542c625c4af8f78f227b2749b87ca6acdb37 (patch) | |
tree | e46318e01686bbe18d9f2d6ad93e3f46277f58b5 /drivers/net/ethernet/broadcom/bcmsysport.c | |
parent | Merge branch 'nfp-tls-implement-the-stream-sync-RX-resync' (diff) | |
download | linux-d63b542c625c4af8f78f227b2749b87ca6acdb37.tar.xz linux-d63b542c625c4af8f78f227b2749b87ca6acdb37.zip |
net: systemport: Set correct DMA mask
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>
Diffstat (limited to 'drivers/net/ethernet/broadcom/bcmsysport.c')
-rw-r--r-- | drivers/net/ethernet/broadcom/bcmsysport.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/ethernet/broadcom/bcmsysport.c b/drivers/net/ethernet/broadcom/bcmsysport.c index 8e3152779a61..1907e47fd0af 100644 --- a/drivers/net/ethernet/broadcom/bcmsysport.c +++ b/drivers/net/ethernet/broadcom/bcmsysport.c @@ -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; |