* [PATCH net-next] net: systemport: Set correct DMA mask
@ 2019-12-18 0:29 Florian Fainelli
2019-12-20 2:10 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Florian Fainelli @ 2019-12-18 0:29 UTC (permalink / raw)
To: netdev
Cc: jakub.kicinski, Florian Fainelli, David S. Miller,
open list:BROADCOM SYSTEMPORT ETHERNET DRIVER, open list
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>
---
drivers/net/ethernet/broadcom/bcmsysport.c | 8 ++++++++
1 file changed, 8 insertions(+)
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;
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net-next] net: systemport: Set correct DMA mask
2019-12-18 0:29 [PATCH net-next] net: systemport: Set correct DMA mask Florian Fainelli
@ 2019-12-20 2:10 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-12-20 2:10 UTC (permalink / raw)
To: f.fainelli; +Cc: netdev, jakub.kicinski, bcm-kernel-feedback-list, linux-kernel
From: Florian Fainelli <f.fainelli@gmail.com>
Date: Tue, 17 Dec 2019 16:29:50 -0800
> 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>
Applied, thanks Florian.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-12-20 2:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-18 0:29 [PATCH net-next] net: systemport: Set correct DMA mask Florian Fainelli
2019-12-20 2:10 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).