[<prev] [next>] [day] [month] [year] [list]
Message-Id: <S1751987AbeECEYO/20180503042426Z+265@vger.kernel.org>
Date: Thu, 03 May 2018 14:24:09 +1000
From: Finn Thain <fthain@...egraphics.com.au>
To: "David S. Miller" <davem@...emloft.net>
Cc: linux-m68k@...ts.linux-m68k.org, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH net] macsonic: Set platform device coherent_dma_mask
Set the device's coherent_dma_mask to avoid a WARNING splat.
Please see commit 205e1b7f51e4 ("dma-mapping: warn when there is
no coherent_dma_mask").
Cc: linux-m68k@...ts.linux-m68k.org
Signed-off-by: Finn Thain <fthain@...egraphics.com.au>
---
drivers/net/ethernet/natsemi/macsonic.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/net/ethernet/natsemi/macsonic.c b/drivers/net/ethernet/natsemi/macsonic.c
index 0937fc2a928e..37b1ffa8bb61 100644
--- a/drivers/net/ethernet/natsemi/macsonic.c
+++ b/drivers/net/ethernet/natsemi/macsonic.c
@@ -523,6 +523,10 @@ static int mac_sonic_platform_probe(struct platform_device *pdev)
struct sonic_local *lp;
int err;
+ err = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
+ if (err)
+ return err;
+
dev = alloc_etherdev(sizeof(struct sonic_local));
if (!dev)
return -ENOMEM;
--
2.16.1
Powered by blists - more mailing lists