[PATCH net] net: seeq: fix crash caused by not set dev.parent

Subsystems: networking drivers, the rest

STALE2682d

2 messages, 2 authors, 2019-05-13 · open the first message on its own page

[PATCH net] net: seeq: fix crash caused by not set dev.parent

From: Thomas Bogendoerfer <hidden>
Date: 2019-05-13 11:15:34

The old MIPS implementation of dma_cache_sync() didn't use the dev argument,
but commit c9eb6172c328 ("dma-mapping: turn dma_cache_sync into a
dma_map_ops method") changed that, so we now need to set dev.parent.

Signed-off-by: Thomas Bogendoerfer <redacted>
---
 drivers/net/ethernet/seeq/sgiseeq.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/seeq/sgiseeq.c b/drivers/net/ethernet/seeq/sgiseeq.c
index 70cce63a6081..696037d5ac3d 100644
--- a/drivers/net/ethernet/seeq/sgiseeq.c
+++ b/drivers/net/ethernet/seeq/sgiseeq.c
@@ -735,6 +735,7 @@ static int sgiseeq_probe(struct platform_device *pdev)
 	}
 
 	platform_set_drvdata(pdev, dev);
+	SET_NETDEV_DEV(dev, &pdev->dev);
 	sp = netdev_priv(dev);
 
 	/* Make private data page aligned */
-- 
2.13.7

Re: [PATCH net] net: seeq: fix crash caused by not set dev.parent

From: David Miller <davem@davemloft.net>
Date: 2019-05-13 16:05:01

From: Thomas Bogendoerfer <redacted>
Date: Mon, 13 May 2019 13:15:17 +0200
The old MIPS implementation of dma_cache_sync() didn't use the dev argument,
but commit c9eb6172c328 ("dma-mapping: turn dma_cache_sync into a
dma_map_ops method") changed that, so we now need to set dev.parent.

Signed-off-by: Thomas Bogendoerfer <redacted>
Applied and queued up for -stable.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help