From: Johan Hovold <johan@kernel.org> Date: 2016-11-28 18:28:25
This series fixes failures to deregister and free fixed-link phydevs
that have been registered using the of_phy_register_fixed_link()
interface.
All but two drivers currently fail to do this and this series fixes most
of them with the exception of a staging driver and the stmmac drivers
which will be fixed by follow-on patches.
Included are also a couple of fixes for related of-node leaks.
Note that all patches except the of_mdio one have been compile-tested
only.
Also note that the series is against net due to dependencies not yet in
net-next.
Johan
Johan Hovold (16):
net: dsa: slave: fix of-node leak and phy priority
of_mdio: add helper to deregister fixed-link PHYs
net: ethernet: altera: fix fixed-link phydev leaks
net: ethernet: aurora: nb8800: fix fixed-link phydev leaks
net: ethernet: bcmsysport: fix fixed-link phydev leaks
net: ethernet: bcmgenet: fix fixed-link phydev leaks
net: ethernet: fec: fix fixed-link phydev leaks
net: ethernet: fs_enet: fix fixed-link phydev leaks
net: ethernet: gianfar: fix fixed-link phydev leaks
net: ethernet: ucc_geth: fix fixed-link phydev leaks
net: ethernet: marvell: mvneta: fix fixed-link phydev leaks
net: ethernet: mediatek: fix fixed-link phydev leaks
net: ethernet: renesas: ravb: fix fixed-link phydev leaks
net: ethernet: dwc_eth_qos: fix fixed-link phydev leaks
net: ethernet: ti: davinci_emac: fix fixed-link phydev and of-node
leaks
net: dsa: slave: fix fixed-link phydev leaks
drivers/net/ethernet/altera/altera_tse_main.c | 9 ++++++++-
drivers/net/ethernet/aurora/nb8800.c | 9 +++++++--
drivers/net/ethernet/broadcom/bcmsysport.c | 17 +++++++++++-----
drivers/net/ethernet/broadcom/genet/bcmmii.c | 6 ++++++
drivers/net/ethernet/freescale/fec_main.c | 5 +++++
.../net/ethernet/freescale/fs_enet/fs_enet-main.c | 7 ++++++-
drivers/net/ethernet/freescale/gianfar.c | 8 ++++++++
drivers/net/ethernet/freescale/ucc_geth.c | 23 +++++++++++++++-------
drivers/net/ethernet/marvell/mvneta.c | 5 +++++
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 4 ++++
drivers/net/ethernet/renesas/ravb_main.c | 17 +++++++++++++---
drivers/net/ethernet/synopsys/dwc_eth_qos.c | 20 ++++++++++++-------
drivers/net/ethernet/ti/cpsw.c | 16 ++-------------
drivers/net/ethernet/ti/davinci_emac.c | 10 +++++++++-
drivers/of/of_mdio.c | 15 ++++++++++++++
include/linux/of_mdio.h | 4 ++++
net/dsa/dsa.c | 12 ++---------
net/dsa/slave.c | 19 +++++++++++++++---
18 files changed, 152 insertions(+), 54 deletions(-)
--
2.7.3
From: Johan Hovold <johan@kernel.org> Date: 2016-11-28 18:27:38
Make sure to deregister and free any fixed-link PHY registered using
of_phy_register_fixed_link() on probe errors and on driver unbind.
Fixes: c7dfe3abf40e ("net: ethernet: nb8800: support fixed-link DT
node")
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/net/ethernet/aurora/nb8800.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
From: Johan Hovold <johan@kernel.org> Date: 2016-11-28 18:28:10
Make sure to drop the reference taken by of_parse_phandle() before
returning from dsa_slave_phy_setup().
Note that this also modifies the PHY priority so that any fixed-link
node is only parsed when no phy-handle is given, which is in accordance
with the common scheme for this.
Fixes: 0d8bcdd383b8 ("net: dsa: allow for more complex PHY setups")
Signed-off-by: Johan Hovold <redacted>
---
net/dsa/slave.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
@@ -1125,7 +1125,7 @@ static int dsa_slave_phy_setup(struct dsa_slave_priv *p,p->phy_interface=mode;phy_dn=of_parse_phandle(port_dn,"phy-handle",0);-if(of_phy_is_fixed_link(port_dn)){+if(!phy_dn&&of_phy_is_fixed_link(port_dn)){/* In the case of a fixed PHY, the DT node associated*tothefixedPHYisthePortDTnode*/
@@ -1135,7 +1135,7 @@ static int dsa_slave_phy_setup(struct dsa_slave_priv *p,returnret;}phy_is_fixed=true;-phy_dn=port_dn;+phy_dn=of_node_get(port_dn);}if(ds->ops->get_phy_flags)
@@ -1154,6 +1154,7 @@ static int dsa_slave_phy_setup(struct dsa_slave_priv *p,ret=dsa_slave_phy_connect(p,slave_dev,phy_id);if(ret){netdev_err(slave_dev,"failed to connect to phy%d: %d\n",phy_id,ret);+of_node_put(phy_dn);returnret;}}else{
@@ -1162,6 +1163,8 @@ static int dsa_slave_phy_setup(struct dsa_slave_priv *p,phy_flags,p->phy_interface);}++of_node_put(phy_dn);}if(p->phy&&phy_is_fixed)
--
2.7.3
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Johan Hovold <johan@kernel.org> Date: 2016-11-28 18:28:39
Add helper to deregister fixed-link PHYs registered using
of_phy_register_fixed_link().
Convert the two drivers that care to deregister their fixed-link PHYs to
use the new helper, but note that most drivers currently fail to do so.
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/net/ethernet/ti/cpsw.c | 16 ++--------------
drivers/of/of_mdio.c | 15 +++++++++++++++
include/linux/of_mdio.h | 4 ++++
net/dsa/dsa.c | 12 ++----------
4 files changed, 23 insertions(+), 24 deletions(-)
From: Johan Hovold <johan@kernel.org> Date: 2016-11-28 18:28:45
Make sure to deregister and free any fixed-link PHY registered using
of_phy_register_fixed_link() on probe errors and on driver unbind.
Fixes: 7cdbc6f74f8e ("altera tse: add support for fixed-links.")
Signed-off-by: Johan Hovold <redacted>
---
drivers/net/ethernet/altera/altera_tse_main.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
@@ -819,6 +819,8 @@ static int init_phy(struct net_device *dev)if(!phydev){netdev_err(dev,"Could not find the PHY\n");+if(fixed_link)+of_phy_deregister_fixed_link(priv->device->of_node);return-ENODEV;}
@@ -1545,10 +1547,15 @@ static int altera_tse_probe(struct platform_device *pdev)staticintaltera_tse_remove(structplatform_device*pdev){structnet_device*ndev=platform_get_drvdata(pdev);+structaltera_tse_private*priv=netdev_priv(ndev);-if(ndev->phydev)+if(ndev->phydev){phy_disconnect(ndev->phydev);+if(of_phy_is_fixed_link(priv->device->of_node))+of_phy_deregister_fixed_link(priv->device->of_node);+}+platform_set_drvdata(pdev,NULL);altera_tse_mdio_destroy(ndev);unregister_netdev(ndev);
--
2.7.3
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Johan Hovold <johan@kernel.org> Date: 2016-11-28 18:29:08
Make sure to deregister and free any fixed-link PHY registered using
of_phy_register_fixed_link() on probe errors and on driver unbind.
Also remember to put the of-node reference on probe errors.
Fixes: 1bb6aa56bb38 ("net: davinci_emac: Add support for fixed-link
PHY")
Signed-off-by: Johan Hovold <redacted>
---
drivers/net/ethernet/ti/davinci_emac.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
@@ -1767,6 +1767,7 @@ static int davinci_emac_try_get_mac(struct platform_device *pdev,*/staticintdavinci_emac_probe(structplatform_device*pdev){+structdevice_node*np=pdev->dev.of_node;intrc=0;structresource*res,*res_ctrl;structnet_device*ndev;
@@ -1805,7 +1806,7 @@ static int davinci_emac_probe(struct platform_device *pdev)if(!pdata){dev_err(&pdev->dev,"no platform data\n");rc=-ENODEV;-gotono_pdata;+gotoerr_free_netdev;}/* MAC addr and PHY mask , RMII enable info from platform_data */
@@ -1941,6 +1942,10 @@ static int davinci_emac_probe(struct platform_device *pdev)cpdma_chan_destroy(priv->rxchan);cpdma_ctlr_destroy(priv->dma);no_pdata:+if(of_phy_is_fixed_link(np))+of_phy_deregister_fixed_link(np);+of_node_put(priv->phy_node);+err_free_netdev:free_netdev(ndev);returnrc;}
@@ -1968,6 +1974,8 @@ static int davinci_emac_remove(struct platform_device *pdev)unregister_netdev(ndev);of_node_put(priv->phy_node);pm_runtime_disable(&pdev->dev);+if(of_phy_is_fixed_link(np))+of_phy_deregister_fixed_link(np);free_netdev(ndev);return0;
--
2.7.3
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Johan Hovold <johan@kernel.org> Date: 2016-11-28 18:29:18
Make sure to deregister and free any fixed-link PHY registered using
of_phy_register_fixed_link() on probe errors and on driver unbind.
Fixes: 077742dac2c7 ("dwc_eth_qos: Add support for Synopsys DWC Ethernet
QoS")
Signed-off-by: Johan Hovold <redacted>
---
drivers/net/ethernet/synopsys/dwc_eth_qos.c | 20 +++++++++++++-------
1 file changed, 13 insertions(+), 7 deletions(-)
@@ -2881,7 +2881,7 @@ static int dwceqos_probe(struct platform_device *pdev)ret=of_get_phy_mode(lp->pdev->dev.of_node);if(ret<0){dev_err(&lp->pdev->dev,"error in getting phy i/f\n");-gotoerr_out_clk_dis_phy;+gotoerr_out_deregister_fixed_link;}lp->phy_interface=ret;
@@ -2889,14 +2889,14 @@ static int dwceqos_probe(struct platform_device *pdev)ret=dwceqos_mii_init(lp);if(ret){dev_err(&lp->pdev->dev,"error in dwceqos_mii_init\n");-gotoerr_out_clk_dis_phy;+gotoerr_out_deregister_fixed_link;}ret=dwceqos_mii_probe(ndev);if(ret!=0){netdev_err(ndev,"mii_probe fail.\n");ret=-ENXIO;-gotoerr_out_clk_dis_phy;+gotoerr_out_deregister_fixed_link;}dwceqos_set_umac_addr(lp,lp->ndev->dev_addr,0);
@@ -2914,7 +2914,7 @@ static int dwceqos_probe(struct platform_device *pdev)if(ret){dev_err(&lp->pdev->dev,"Unable to retrieve DT, error %d\n",ret);-gotoerr_out_clk_dis_phy;+gotoerr_out_deregister_fixed_link;}dev_info(&lp->pdev->dev,"pdev->id %d, baseaddr 0x%08lx, irq %d\n",pdev->id,ndev->base_addr,ndev->irq);
@@ -2924,7 +2924,7 @@ static int dwceqos_probe(struct platform_device *pdev)if(ret){dev_err(&lp->pdev->dev,"Unable to request IRQ %d, error %d\n",ndev->irq,ret);-gotoerr_out_clk_dis_phy;+gotoerr_out_deregister_fixed_link;}if(netif_msg_probe(lp))
@@ -2935,11 +2935,14 @@ static int dwceqos_probe(struct platform_device *pdev)ret=register_netdev(ndev);if(ret){dev_err(&pdev->dev,"Cannot register net device, aborting.\n");-gotoerr_out_clk_dis_phy;+gotoerr_out_deregister_fixed_link;}return0;+err_out_deregister_fixed_link:+if(of_phy_is_fixed_link(pdev->dev.of_node))+of_phy_deregister_fixed_link(pdev->dev.of_node);err_out_clk_dis_phy:clk_disable_unprepare(lp->phy_ref_clk);err_out_clk_dis_aper:
@@ -2959,8 +2962,11 @@ static int dwceqos_remove(struct platform_device *pdev)if(ndev){lp=netdev_priv(ndev);-if(ndev->phydev)+if(ndev->phydev){phy_disconnect(ndev->phydev);+if(of_phy_is_fixed_link(pdev->dev.of_node))+of_phy_deregister_fixed_link(pdev->dev.of_node);+}mdiobus_unregister(lp->mii_bus);mdiobus_free(lp->mii_bus);
--
2.7.3
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Johan Hovold <johan@kernel.org> Date: 2016-11-28 18:29:29
Make sure to deregister and free any fixed-link PHY registered using
of_phy_register_fixed_link() on initialisation errors and on device
close after having disconnected the PHY.
Fixes: b4bc88a868ed ("ravb: Add fixed-link support")
Signed-off-by: Johan Hovold <redacted>
---
drivers/net/ethernet/renesas/ravb_main.c | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
@@ -1008,7 +1008,8 @@ static int ravb_phy_init(struct net_device *ndev)of_node_put(pn);if(!phydev){netdev_err(ndev,"failed to connect PHY\n");-return-ENOENT;+err=-ENOENT;+gotoerr_deregister_fixed_link;}/* This driver only support 10/100Mbit speeds on Gen3
@@ -1020,8 +1021,7 @@ static int ravb_phy_init(struct net_device *ndev)err=phy_set_max_speed(phydev,SPEED_100);if(err){netdev_err(ndev,"failed to limit PHY to 100Mbit/s\n");-phy_disconnect(phydev);-returnerr;+gotoerr_phy_disconnect;}netdev_info(ndev,"limited PHY to 100Mbit/s\n");
@@ -1033,6 +1033,14 @@ static int ravb_phy_init(struct net_device *ndev)phy_attached_info(phydev);return0;++err_phy_disconnect:+phy_disconnect(phydev);+err_deregister_fixed_link:+if(of_phy_is_fixed_link(np))+of_phy_deregister_fixed_link(np);++returnerr;}/* PHY control start function */
@@ -1634,6 +1642,7 @@ static void ravb_set_rx_mode(struct net_device *ndev)/* Device close function for Ethernet AVB */staticintravb_close(structnet_device*ndev){+structdevice_node*np=ndev->dev.parent->of_node;structravb_private*priv=netdev_priv(ndev);structravb_tstamp_skb*ts_skb,*ts_skb2;
@@ -1663,6 +1672,8 @@ static int ravb_close(struct net_device *ndev)if(ndev->phydev){phy_stop(ndev->phydev);phy_disconnect(ndev->phydev);+if(of_phy_is_fixed_link(np))+of_phy_deregister_fixed_link(np);}if(priv->chip_id!=RCAR_GEN2){
From: Johan Hovold <johan@kernel.org> Date: 2016-11-28 18:29:37
Make sure to deregister and free any fixed-link PHY registered using
of_phy_register_fixed_link() on slave-setup errors and on slave destroy.
Fixes: 0d8bcdd383b8 ("net: dsa: allow for more complex PHY setups")
Signed-off-by: Johan Hovold <redacted>
---
net/dsa/slave.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
@@ -1177,6 +1177,8 @@ static int dsa_slave_phy_setup(struct dsa_slave_priv *p,ret=dsa_slave_phy_connect(p,slave_dev,p->port);if(ret){netdev_err(slave_dev,"failed to connect to port %d: %d\n",p->port,ret);+if(phy_is_fixed)+of_phy_deregister_fixed_link(port_dn);returnret;}}
--
2.7.3
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Johan Hovold <johan@kernel.org> Date: 2016-11-28 18:29:48
Make sure to deregister and free any fixed-link PHY registered using
of_phy_register_fixed_link() on probe errors and on driver unbind.
Fixes: 87009814cdbb ("ucc_geth: use the new fixed PHY helpers")
Signed-off-by: Johan Hovold <redacted>
---
drivers/net/ethernet/freescale/ucc_geth.c | 23 ++++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)
From: Johan Hovold <johan@kernel.org> Date: 2016-11-28 18:30:01
Make sure to deregister and free any fixed-link PHY registered using
of_phy_register_fixed_link() on probe errors and on driver unbind.
Fixes: bb74d9a4a87b ("fs_enet: use the new fixed PHY helpers")
Signed-off-by: Johan Hovold <redacted>
---
drivers/net/ethernet/freescale/fs_enet/fs_enet-main.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
From: Johan Hovold <johan@kernel.org> Date: 2016-11-28 18:30:13
Make sure to deregister and free any fixed-link PHY registered using
of_phy_register_fixed_link() on probe errors and on driver unbind.
Fixes: 407066f8f371 ("net: fec: Support phys probed from devicetree and
fixed-link")
Signed-off-by: Johan Hovold <redacted>
---
drivers/net/ethernet/freescale/fec_main.c | 5 +++++
1 file changed, 5 insertions(+)
From: Johan Hovold <johan@kernel.org> Date: 2016-11-28 18:30:24
Make sure to deregister and free any fixed-link PHY registered using
of_phy_register_fixed_link() on probe errors and on driver unbind.
Fixes: 83895bedeee6 ("net: mvneta: add support for fixed links")
Signed-off-by: Johan Hovold <redacted>
---
drivers/net/ethernet/marvell/mvneta.c | 5 +++++
1 file changed, 5 insertions(+)
From: Johan Hovold <johan@kernel.org> Date: 2016-11-28 18:30:36
Make sure to deregister and free any fixed-link PHY registered using
of_phy_register_fixed_link() on probe errors and on driver unbind.
Note that we're still leaking any fixed-link PHY registered in the
non-OF probe path.
Fixes: 9abf0c2b717a ("net: bcmgenet: use the new fixed PHY helpers")
Signed-off-by: Johan Hovold <redacted>
---
drivers/net/ethernet/broadcom/genet/bcmmii.c | 6 ++++++
1 file changed, 6 insertions(+)
From: Johan Hovold <johan@kernel.org> Date: 2016-11-28 18:30:46
Make sure to deregister and free any fixed-link PHY registered using
of_phy_register_fixed_link() on probe errors and on driver unbind.
Fixes: be40364544bd ("gianfar: use the new fixed PHY helpers")
Signed-off-by: Johan Hovold <redacted>
---
drivers/net/ethernet/freescale/gianfar.c | 8 ++++++++
1 file changed, 8 insertions(+)
From: Johan Hovold <johan@kernel.org> Date: 2016-11-28 18:33:15
Make sure to deregister and free any fixed-link PHY registered using
of_phy_register_fixed_link() on probe errors and on driver unbind.
Fixes: 186534a3f832 ("net: systemport: use the new fixed PHY helpers")
Signed-off-by: Johan Hovold <redacted>
---
drivers/net/ethernet/broadcom/bcmsysport.c | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
@@ -1755,13 +1755,13 @@ static int bcm_sysport_probe(struct platform_device *pdev)if(priv->irq0<=0||priv->irq1<=0){dev_err(&pdev->dev,"invalid interrupts\n");ret=-EINVAL;-gotoerr;+gotoerr_free_netdev;}priv->base=devm_ioremap_resource(&pdev->dev,r);if(IS_ERR(priv->base)){ret=PTR_ERR(priv->base);-gotoerr;+gotoerr_free_netdev;}priv->netdev=dev;
@@ -1779,7 +1779,7 @@ static int bcm_sysport_probe(struct platform_device *pdev)ret=of_phy_register_fixed_link(dn);if(ret){dev_err(&pdev->dev,"failed to register fixed PHY\n");-gotoerr;+gotoerr_free_netdev;}priv->phy_dn=dn;
@@ -1821,7 +1821,7 @@ static int bcm_sysport_probe(struct platform_device *pdev)ret=register_netdev(dev);if(ret){dev_err(&pdev->dev,"failed to register net_device\n");-gotoerr;+gotoerr_deregister_fixed_link;}priv->rev=topctrl_readl(priv,REV_CNTL)&REV_MASK;
@@ -1832,7 +1832,11 @@ static int bcm_sysport_probe(struct platform_device *pdev)priv->base,priv->irq0,priv->irq1,txq,rxq);return0;-err:++err_deregister_fixed_link:+if(of_phy_is_fixed_link(dn))+of_phy_deregister_fixed_link(dn);+err_free_netdev:free_netdev(dev);returnret;}
@@ -1840,11 +1844,14 @@ static int bcm_sysport_probe(struct platform_device *pdev)staticintbcm_sysport_remove(structplatform_device*pdev){structnet_device*dev=dev_get_drvdata(&pdev->dev);+structdevice_node*dn=pdev->dev.of_node;/* Not much to do, ndo_close has been called*andweusemanagedallocations*/unregister_netdev(dev);+if(of_phy_is_fixed_link(dn))+of_phy_deregister_fixed_link(dn);free_netdev(dev);dev_set_drvdata(&pdev->dev,NULL);
From: Johan Hovold <johan@kernel.org> Date: 2016-11-28 18:49:34
Make sure to deregister and free any fixed-link PHY registered using
of_phy_register_fixed_link() on initialisation errors and on uninit.
Fixes: 0c72c50f6f93 ("net-next: mediatek: add fixed-phy support")
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 4 ++++
1 file changed, 4 insertions(+)
From: Thomas Petazzoni <hidden> Date: 2016-11-28 20:10:25
Hello,
On Mon, 28 Nov 2016 19:25:04 +0100, Johan Hovold wrote:
Make sure to deregister and free any fixed-link PHY registered using
of_phy_register_fixed_link() on probe errors and on driver unbind.
Fixes: 83895bedeee6 ("net: mvneta: add support for fixed links")
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/net/ethernet/marvell/mvneta.c | 5 +++++
1 file changed, 5 insertions(+)
Reviewed-by: Thomas Petazzoni <redacted>
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
From: David Miller <davem@davemloft.net> Date: 2016-11-30 04:17:54
From: Johan Hovold <johan@kernel.org>
Date: Mon, 28 Nov 2016 19:24:53 +0100
This series fixes failures to deregister and free fixed-link phydevs
that have been registered using the of_phy_register_fixed_link()
interface.
All but two drivers currently fail to do this and this series fixes most
of them with the exception of a staging driver and the stmmac drivers
which will be fixed by follow-on patches.
Included are also a couple of fixes for related of-node leaks.
Note that all patches except the of_mdio one have been compile-tested
only.
Also note that the series is against net due to dependencies not yet in
net-next.
Make sure to deregister and free any fixed-link PHY registered using
of_phy_register_fixed_link() on probe errors and on driver unbind.
Fixes: c7dfe3abf40e ("net: ethernet: nb8800: support fixed-link DT node")
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/net/ethernet/aurora/nb8800.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
Did you use scripts/get_maintainer.pl ?
Neither the author of the driver (Mans) nor the author of
the code in question (Sebastian) were CCed on this patch.
It looks like the CC list was truncated, the last entry being
Vivien Didelot <
Regards.
From: Johan Hovold <johan@kernel.org> Date: 2016-11-30 09:51:32
On Wed, Nov 30, 2016 at 10:36:45AM +0100, Mason wrote:
On 28/11/2016 19:24, Johan Hovold wrote:
quoted
Make sure to deregister and free any fixed-link PHY registered using
of_phy_register_fixed_link() on probe errors and on driver unbind.
Fixes: c7dfe3abf40e ("net: ethernet: nb8800: support fixed-link DT node")
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/net/ethernet/aurora/nb8800.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
Did you use scripts/get_maintainer.pl ?
Neither the author of the driver (Mans) nor the author of
the code in question (Sebastian) were CCed on this patch.
I did, but I only included parties listed as maintainers, not commit
signers, to keep the already large CC list down somewhat.
Johan
On Tue, 29 Nov 2016 at 00:00, Johan Hovold [off-list ref] wrote:
quoted hunk
Make sure to deregister and free any fixed-link PHY registered using
of_phy_register_fixed_link() on probe errors and on driver unbind.
Fixes: 83895bedeee6 ("net: mvneta: add support for fixed links")
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/net/ethernet/marvell/mvneta.c | 5 +++++
1 file changed, 5 insertions(+)
@@ -4191,6 +4191,8 @@ static int mvneta_probe(struct platform_device *pdev)clk_disable_unprepare(pp->clk);err_put_phy_node:of_node_put(phy_node);+if(of_phy_is_fixed_link(dn))+of_phy_deregister_fixed_link(dn);
While building kernel Image for arm architecture on stable-rc 4.4 branch
the following build error found.
drivers/net/ethernet/marvell/mvneta.c:3442:3: error: implicit
declaration of function 'of_phy_deregister_fixed_link'; did you mean
'of_phy_register_fixed_link'? [-Werror=implicit-function-declaration]
| of_phy_deregister_fixed_link(dn);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| of_phy_register_fixed_link
ref:
https://gitlab.com/Linaro/lkft/kernel-runs/-/jobs/541374729
- Naresh
From: Johan Hovold <johan@kernel.org> Date: 2020-05-07 06:44:27
On Thu, May 07, 2020 at 12:27:53AM +0530, Naresh Kamboju wrote:
On Tue, 29 Nov 2016 at 00:00, Johan Hovold [off-list ref] wrote:
quoted
Make sure to deregister and free any fixed-link PHY registered using
of_phy_register_fixed_link() on probe errors and on driver unbind.
Fixes: 83895bedeee6 ("net: mvneta: add support for fixed links")
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/net/ethernet/marvell/mvneta.c | 5 +++++
1 file changed, 5 insertions(+)
@@ -4191,6 +4191,8 @@ static int mvneta_probe(struct platform_device *pdev)clk_disable_unprepare(pp->clk);err_put_phy_node:of_node_put(phy_node);+if(of_phy_is_fixed_link(dn))+of_phy_deregister_fixed_link(dn);
While building kernel Image for arm architecture on stable-rc 4.4 branch
the following build error found.
drivers/net/ethernet/marvell/mvneta.c:3442:3: error: implicit
declaration of function 'of_phy_deregister_fixed_link'; did you mean
'of_phy_register_fixed_link'? [-Werror=implicit-function-declaration]
| of_phy_deregister_fixed_link(dn);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| of_phy_register_fixed_link
ref:
https://gitlab.com/Linaro/lkft/kernel-runs/-/jobs/541374729
On Thu, May 07, 2020 at 08:44:12AM +0200, Johan Hovold wrote:
On Thu, May 07, 2020 at 12:27:53AM +0530, Naresh Kamboju wrote:
quoted
On Tue, 29 Nov 2016 at 00:00, Johan Hovold [off-list ref] wrote:
quoted
Make sure to deregister and free any fixed-link PHY registered using
of_phy_register_fixed_link() on probe errors and on driver unbind.
Fixes: 83895bedeee6 ("net: mvneta: add support for fixed links")
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/net/ethernet/marvell/mvneta.c | 5 +++++
1 file changed, 5 insertions(+)
@@ -4191,6 +4191,8 @@ static int mvneta_probe(struct platform_device *pdev)clk_disable_unprepare(pp->clk);err_put_phy_node:of_node_put(phy_node);+if(of_phy_is_fixed_link(dn))+of_phy_deregister_fixed_link(dn);
While building kernel Image for arm architecture on stable-rc 4.4 branch
the following build error found.
drivers/net/ethernet/marvell/mvneta.c:3442:3: error: implicit
declaration of function 'of_phy_deregister_fixed_link'; did you mean
'of_phy_register_fixed_link'? [-Werror=implicit-function-declaration]
| of_phy_deregister_fixed_link(dn);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| of_phy_register_fixed_link
ref:
https://gitlab.com/Linaro/lkft/kernel-runs/-/jobs/541374729
Ah, thanks for that, I thought I dropped all of the ones that caused
build errors, but missed the above one. I'll go take the whole series
instead.
greg k-h
On Thu, May 07, 2020 at 08:47:34AM +0200, Greg Kroah-Hartman wrote:
On Thu, May 07, 2020 at 08:44:12AM +0200, Johan Hovold wrote:
quoted
On Thu, May 07, 2020 at 12:27:53AM +0530, Naresh Kamboju wrote:
quoted
On Tue, 29 Nov 2016 at 00:00, Johan Hovold [off-list ref] wrote:
quoted
Make sure to deregister and free any fixed-link PHY registered using
of_phy_register_fixed_link() on probe errors and on driver unbind.
Fixes: 83895bedeee6 ("net: mvneta: add support for fixed links")
Signed-off-by: Johan Hovold <johan@kernel.org>
---
drivers/net/ethernet/marvell/mvneta.c | 5 +++++
1 file changed, 5 insertions(+)
@@ -4191,6 +4191,8 @@ static int mvneta_probe(struct platform_device *pdev)clk_disable_unprepare(pp->clk);err_put_phy_node:of_node_put(phy_node);+if(of_phy_is_fixed_link(dn))+of_phy_deregister_fixed_link(dn);
While building kernel Image for arm architecture on stable-rc 4.4 branch
the following build error found.
drivers/net/ethernet/marvell/mvneta.c:3442:3: error: implicit
declaration of function 'of_phy_deregister_fixed_link'; did you mean
'of_phy_register_fixed_link'? [-Werror=implicit-function-declaration]
| of_phy_deregister_fixed_link(dn);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| of_phy_register_fixed_link
ref:
https://gitlab.com/Linaro/lkft/kernel-runs/-/jobs/541374729
Ah, thanks for that, I thought I dropped all of the ones that caused
build errors, but missed the above one. I'll go take the whole series
instead.
This should now all be fixed up, thanks.
While building kernel Image for arm architecture on stable-rc 4.4 branch
the following build error found.
of_mdio: add helper to deregister fixed-link PHYs
commit 3f65047c853a2a5abcd8ac1984af3452b5df4ada upstream.
Add helper to deregister fixed-link PHYs registered using
of_phy_register_fixed_link().
Convert the two drivers that care to deregister their fixed-link PHYs to
use the new helper, but note that most drivers currently fail to do so.
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
[only take helper function for 4.4.y - gregkh]
# make -sk KBUILD_BUILD_USER=TuxBuild -C/linux -j16 ARCH=arm
CROSS_COMPILE=arm-linux-gnueabihf- HOSTCC=gcc CC="sccache
arm-linux-gnueabihf-gcc" O=build zImage
70 #
71 ../drivers/of/of_mdio.c: In function ‘of_phy_deregister_fixed_link’:
72 ../drivers/of/of_mdio.c:379:2: error: implicit declaration of
function ‘fixed_phy_unregister’; did you mean ‘fixed_phy_register’?
[-Werror=implicit-function-declaration]
73 379 | fixed_phy_unregister(phydev);
74 | ^~~~~~~~~~~~~~~~~~~~
75 | fixed_phy_register
76 ../drivers/of/of_mdio.c:381:22: error: ‘struct phy_device’ has no
member named ‘mdio’; did you mean ‘mdix’?
77 381 | put_device(&phydev->mdio.dev); /* of_phy_find_device() */
78 | ^~~~
79 | mdix
Ah, thanks for that, I thought I dropped all of the ones that caused
build errors, but missed the above one. I'll go take the whole series
instead.
This should now all be fixed up, thanks.
While building kernel Image for arm architecture on stable-rc 4.4 branch
the following build error found.
of_mdio: add helper to deregister fixed-link PHYs
commit 3f65047c853a2a5abcd8ac1984af3452b5df4ada upstream.
Add helper to deregister fixed-link PHYs registered using
of_phy_register_fixed_link().
Convert the two drivers that care to deregister their fixed-link PHYs to
use the new helper, but note that most drivers currently fail to do so.
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
[only take helper function for 4.4.y - gregkh]
# make -sk KBUILD_BUILD_USER=TuxBuild -C/linux -j16 ARCH=arm
CROSS_COMPILE=arm-linux-gnueabihf- HOSTCC=gcc CC="sccache
arm-linux-gnueabihf-gcc" O=build zImage
70 #
71 ../drivers/of/of_mdio.c: In function ‘of_phy_deregister_fixed_link’:
72 ../drivers/of/of_mdio.c:379:2: error: implicit declaration of
function ‘fixed_phy_unregister’; did you mean ‘fixed_phy_register’?
[-Werror=implicit-function-declaration]
73 379 | fixed_phy_unregister(phydev);
74 | ^~~~~~~~~~~~~~~~~~~~
75 | fixed_phy_register
76 ../drivers/of/of_mdio.c:381:22: error: ‘struct phy_device’ has no
member named ‘mdio’; did you mean ‘mdix’?
77 381 | put_device(&phydev->mdio.dev); /* of_phy_find_device() */
78 | ^~~~
79 | mdix
Another dependency: 5bcbe0f35fb1 ("phy: fixed: Fix removal of phys.")
Greg, these patches are from four years ago so can't really remember if
there are other dependencies or reasons against backporting them (the
missing stable tags are per Dave's preference), sorry.
The cover letter also mentions another dependency, but that may just
have been some context conflict.
Perhaps you better drop these unless you want to review them closer.
Johan
Ah, thanks for that, I thought I dropped all of the ones that caused
build errors, but missed the above one. I'll go take the whole series
instead.
This should now all be fixed up, thanks.
While building kernel Image for arm architecture on stable-rc 4.4 branch
the following build error found.
of_mdio: add helper to deregister fixed-link PHYs
commit 3f65047c853a2a5abcd8ac1984af3452b5df4ada upstream.
Add helper to deregister fixed-link PHYs registered using
of_phy_register_fixed_link().
Convert the two drivers that care to deregister their fixed-link PHYs to
use the new helper, but note that most drivers currently fail to do so.
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
[only take helper function for 4.4.y - gregkh]
# make -sk KBUILD_BUILD_USER=TuxBuild -C/linux -j16 ARCH=arm
CROSS_COMPILE=arm-linux-gnueabihf- HOSTCC=gcc CC="sccache
arm-linux-gnueabihf-gcc" O=build zImage
70 #
71 ../drivers/of/of_mdio.c: In function ‘of_phy_deregister_fixed_link’:
72 ../drivers/of/of_mdio.c:379:2: error: implicit declaration of
function ‘fixed_phy_unregister’; did you mean ‘fixed_phy_register’?
[-Werror=implicit-function-declaration]
73 379 | fixed_phy_unregister(phydev);
74 | ^~~~~~~~~~~~~~~~~~~~
75 | fixed_phy_register
76 ../drivers/of/of_mdio.c:381:22: error: ‘struct phy_device’ has no
member named ‘mdio’; did you mean ‘mdix’?
77 381 | put_device(&phydev->mdio.dev); /* of_phy_find_device() */
78 | ^~~~
79 | mdix
Another dependency: 5bcbe0f35fb1 ("phy: fixed: Fix removal of phys.")
Greg, these patches are from four years ago so can't really remember if
there are other dependencies or reasons against backporting them (the
missing stable tags are per Dave's preference), sorry.
The cover letter also mentions another dependency, but that may just
have been some context conflict.
Perhaps you better drop these unless you want to review them closer.
Good idea, I've dropped them all for now, sorry for the noise.
greg k-h