net: ethernet: Make sure we set dev->dev.parent
Subsystems (2)
cover net: ethernet: Make sure we set dev->dev.parent
Hi David,
This patch series builds atop:
ec988ad78ed6d184a7f4ca6b8e962b0e8f1de461 ("phy: Don't increment MDIO bus refcount unless it's a different owner")
FMAN is the one that potentially needs patching as well (call SET_NETDEV_DEV), but there appears to be no way that init_phy is called right now, or there is not such an in-tree user. Madalin, can you comment on that?
Florian Fainelli (2):
net: ethernet: lantiq_etop: Call SET_NETDEV_DEV()
net: ethernet: cpmac: Call SET_NETDEV_DEV()
drivers/net/ethernet/lantiq_etop.c | 1 + drivers/net/ethernet/ti/cpmac.c | 1 + 2 files changed, 2 insertions(+)
Signature · 1 line
2.9.3
PATCH 1/2 net: ethernet: lantiq_etop: Call SET_NETDEV_DEV()
The Lantiq Etop driver calls into PHYLIB which now checks for net_device->dev.parent, so make sure we do set it before calling into any MDIO/PHYLIB related function.
--- drivers/net/ethernet/lantiq_etop.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/ethernet/lantiq_etop.c +1 -0
@@ -704,6 +704,7 @@ ltq_etop_probe(struct platform_device *pdev) priv->pldata =dev_get_platdata (&pdev->dev); priv->netdev = dev;spin_lock_init (&priv->lock); +SET_NETDEV_DEV (dev, &pdev->dev);for (i =0 ; i <MAX_DMA_CHAN ; i++) {if (IS_TX (i))
Signature · 1 line
2.9.3
PATCH 2/2 net: ethernet: cpmac: Call SET_NETDEV_DEV()
In reply to Florian FainelliThe TI CPMAC driver calls into PHYLIB which now checks for net_device->dev.parent, so make sure we do set it before calling into any MDIO/PHYLIB related function.
--- drivers/net/ethernet/ti/cpmac.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/ethernet/ti/cpmac.c +1 -0
@@ -1113,6 +1113,7 @@ static int cpmac_probe(struct platform_device *pdev)if (!dev)return -ENOMEM ; +SET_NETDEV_DEV (dev, &pdev->dev);platform_set_drvdata (pdev, dev); priv =netdev_priv (dev);
Signature · 1 line
2.9.3
David Miller
maintainerFrom: Florian Fainelli <[email protected]>
Date: Thu, 8 Dec 2016 11:41:23 -0800
Quoted 8 lines
This patch series builds atop:
ec988ad78ed6d184a7f4ca6b8e962b0e8f1de461("phy: Don't increment MDIO bus refcount unless it's a different owner")FMAN is the one that potentially needs patching as well (call
SET_NETDEV_DEV), but there appears to be no way thatinit_phyis called right now, or there is not such an in-tree user. Madalin, can you comment on that?
Series applied, thanks.