netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 0/2] net: ethernet: Make sure we set dev->dev.parent
@ 2016-12-08 19:41 Florian Fainelli
  2016-12-08 19:41 ` [PATCH net 1/2] net: ethernet: lantiq_etop: Call SET_NETDEV_DEV() Florian Fainelli
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Florian Fainelli @ 2016-12-08 19:41 UTC (permalink / raw)
  To: netdev; +Cc: davem, madalin.bucur, johan, Florian Fainelli

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(+)

-- 
2.9.3

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH net 1/2] net: ethernet: lantiq_etop: Call SET_NETDEV_DEV()
  2016-12-08 19:41 [PATCH net 0/2] net: ethernet: Make sure we set dev->dev.parent Florian Fainelli
@ 2016-12-08 19:41 ` Florian Fainelli
  2016-12-08 19:41 ` [PATCH net 2/2] net: ethernet: cpmac: " Florian Fainelli
  2016-12-09  2:27 ` [PATCH net 0/2] net: ethernet: Make sure we set dev->dev.parent David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2016-12-08 19:41 UTC (permalink / raw)
  To: netdev; +Cc: davem, madalin.bucur, johan, Florian Fainelli

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.

Fixes: ec988ad78ed6 ("phy: Don't increment MDIO bus refcount unless it's a different owner")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 drivers/net/ethernet/lantiq_etop.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/lantiq_etop.c b/drivers/net/ethernet/lantiq_etop.c
index 91e09d68b7e2..a167fd7ee13e 100644
--- a/drivers/net/ethernet/lantiq_etop.c
+++ b/drivers/net/ethernet/lantiq_etop.c
@@ -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))
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH net 2/2] net: ethernet: cpmac: Call SET_NETDEV_DEV()
  2016-12-08 19:41 [PATCH net 0/2] net: ethernet: Make sure we set dev->dev.parent Florian Fainelli
  2016-12-08 19:41 ` [PATCH net 1/2] net: ethernet: lantiq_etop: Call SET_NETDEV_DEV() Florian Fainelli
@ 2016-12-08 19:41 ` Florian Fainelli
  2016-12-09  2:27 ` [PATCH net 0/2] net: ethernet: Make sure we set dev->dev.parent David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: Florian Fainelli @ 2016-12-08 19:41 UTC (permalink / raw)
  To: netdev; +Cc: davem, madalin.bucur, johan, Florian Fainelli

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

Fixes: ec988ad78ed6 ("phy: Don't increment MDIO bus refcount unless it's a different owner")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 drivers/net/ethernet/ti/cpmac.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/ti/cpmac.c b/drivers/net/ethernet/ti/cpmac.c
index fa0cfda24fd9..28097be2ff28 100644
--- a/drivers/net/ethernet/ti/cpmac.c
+++ b/drivers/net/ethernet/ti/cpmac.c
@@ -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);
 
-- 
2.9.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH net 0/2] net: ethernet: Make sure we set dev->dev.parent
  2016-12-08 19:41 [PATCH net 0/2] net: ethernet: Make sure we set dev->dev.parent Florian Fainelli
  2016-12-08 19:41 ` [PATCH net 1/2] net: ethernet: lantiq_etop: Call SET_NETDEV_DEV() Florian Fainelli
  2016-12-08 19:41 ` [PATCH net 2/2] net: ethernet: cpmac: " Florian Fainelli
@ 2016-12-09  2:27 ` David Miller
  2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2016-12-09  2:27 UTC (permalink / raw)
  To: f.fainelli; +Cc: netdev, madalin.bucur, johan

From: Florian Fainelli <f.fainelli@gmail.com>
Date: Thu,  8 Dec 2016 11:41:23 -0800

> 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?

Series applied, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-12-09  2:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-08 19:41 [PATCH net 0/2] net: ethernet: Make sure we set dev->dev.parent Florian Fainelli
2016-12-08 19:41 ` [PATCH net 1/2] net: ethernet: lantiq_etop: Call SET_NETDEV_DEV() Florian Fainelli
2016-12-08 19:41 ` [PATCH net 2/2] net: ethernet: cpmac: " Florian Fainelli
2016-12-09  2:27 ` [PATCH net 0/2] net: ethernet: Make sure we set dev->dev.parent David Miller

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