2019-05-13 13:13:32

by Thomas Bogendoerfer

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

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 <[email protected]>
---
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


2019-05-13 17:04:11

by David Miller

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

From: Thomas Bogendoerfer <[email protected]>
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 <[email protected]>

Applied and queued up for -stable.