LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH net] macmace: Set platform device coherent_dma_mask
@ 2018-05-03  4:23 Finn Thain
  0 siblings, 0 replies; 19+ messages in thread
From: Finn Thain @ 2018-05-03  4:23 UTC (permalink / raw)
  To: David S. Miller; +Cc: linux-m68k, netdev, linux-kernel

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@lists.linux-m68k.org
Tested-by: Stan Johnson <userm57@yahoo.com>
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
---
 drivers/net/ethernet/apple/macmace.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/ethernet/apple/macmace.c b/drivers/net/ethernet/apple/macmace.c
index 137cbb470af2..98292c49ecf0 100644
--- a/drivers/net/ethernet/apple/macmace.c
+++ b/drivers/net/ethernet/apple/macmace.c
@@ -203,6 +203,10 @@ static int mace_probe(struct platform_device *pdev)
 	unsigned char checksum = 0;
 	int err;
 
+	err = dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32));
+	if (err)
+		return err;
+
 	dev = alloc_etherdev(PRIV_BYTES);
 	if (!dev)
 		return -ENOMEM;
-- 
2.16.1

^ permalink raw reply	[flat|nested] 19+ messages in thread
[parent not found: <S1751632AbeECEYA/20180503042400Z+254@vger.kernel.org>]

end of thread, other threads:[~2018-05-11 22:02 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-03  4:23 [PATCH net] macmace: Set platform device coherent_dma_mask Finn Thain
     [not found] <S1751632AbeECEYA/20180503042400Z+254@vger.kernel.org>
2018-05-03  7:25 ` Geert Uytterhoeven
2018-05-03  8:38   ` Finn Thain
2018-05-03  8:46     ` Geert Uytterhoeven
2018-05-03  8:51       ` Christoph Hellwig
2018-05-03 20:24         ` Michael Schmitz
2018-05-04  7:24           ` Geert Uytterhoeven
2018-05-04  8:16             ` Michael Schmitz
2018-05-10  1:25         ` Finn Thain
2018-05-10  1:25       ` Finn Thain
2018-05-10 20:27         ` Michael Schmitz
2018-05-10 23:55           ` Finn Thain
2018-05-11  2:11             ` Michael Schmitz
2018-05-11  3:28               ` Finn Thain
2018-05-11  4:18                 ` Michael Schmitz
2018-05-11  5:28                   ` Finn Thain
2018-05-11  9:30                     ` Michael Schmitz
2018-05-11 10:06                       ` Finn Thain
2018-05-11 22:02                         ` Michael Schmitz

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).