net: remove empty MDIO bus reset functions
Subsystems (12)
Florian Fainelli
maintainercover net: remove empty MDIO bus reset functions
Hi David,
This patchset removes all empty MDIO bus reset functions that we have in the tree (hopefully all of them). This function is optional for the MDIO bus code in drivers/net/phy/mdio_bus.c::mdiobus_register, the documentation is updated to reflect that.
Having less call sites to update will allow us to implement a generic BMCR_RESET based PHY reset for MDIO buses that require to reset their PHYs before their PHY detection succeeds (e.g: HiSilicon hip04 current submission) and provide it as a helper.
Thanks!
Florian Fainelli (14):
net: greth: remove empty MDIO bus reset function
tg3: remove empty MDIO bus reset function
macb: remove empty MDIO bus reset function
dnet: remove empty MDIO bus reset function
net: ethoc: remove empty MDIO bus function
fec: remove empty MDIO bus function
fs_enet: remove empty MDIO bus function
net: mvmdio: remove empty MDIO bus reset function
net: emaclite: remove empty MDIO bus reset function
net: sun4i: remove empty MDIO bus reset function
net: ftgmac100: remove empty MDIO bus reset function
r6040: remove empty MDIO bus reset function
bfin_mac: remove empty MDIO bus reset function
Documentation: networking: phy.txt: MDIO bus reset is optional
Documentation/networking/phy.txt | 2 +- drivers/net/ethernet/adi/bfin_mac.c | 6 ------ drivers/net/ethernet/aeroflex/greth.c | 6 ------ drivers/net/ethernet/broadcom/tg3.c | 6 ------ drivers/net/ethernet/cadence/macb.c | 6 ------ drivers/net/ethernet/dnet.c | 6 ------ drivers/net/ethernet/ethoc.c | 6 ------ drivers/net/ethernet/faraday/ftgmac100.c | 6 ------ drivers/net/ethernet/freescale/fec_main.c | 6 ------ drivers/net/ethernet/freescale/fs_enet/mii-fec.c | 7 ------- drivers/net/ethernet/marvell/mvmdio.c | 6 ------ drivers/net/ethernet/rdc/r6040.c | 6 ------ drivers/net/ethernet/xilinx/xilinx_emaclite.c | 13 ------------- drivers/net/phy/mdio-sun4i.c | 6 ------ 14 files changed, 1 insertion(+), 87 deletions(-)
Signature · 1 line
1.8.3.2
Florian Fainelli
maintainerPATCH 1/14 net: greth: remove empty MDIO bus reset function
greth_mdio_reset() does nothing useful and this function is optional for the MDIO bus code, so let's just remove it.
--- drivers/net/ethernet/aeroflex/greth.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/net/ethernet/aeroflex/greth.c +0 -6
@@ -1213,11 +1213,6 @@ static int greth_mdio_write(struct mii_bus *bus, int phy, int reg, u16 val)return 0 ; } -static int greth_mdio_reset (struct mii_bus *bus) -{ -return 0 ; -} -static void greth_link_change (struct net_device *dev) {struct greth_private *greth =netdev_priv (dev);
@@ -1332,7 +1327,6 @@ static int greth_mdio_init(struct greth_private *greth)snprintf (greth->mdio->id,MII_BUS_ID_SIZE ,"%s-%d" , greth->mdio->name, greth->irq); greth->mdio->read = greth_mdio_read; greth->mdio->write = greth_mdio_write; - greth->mdio->reset = greth_mdio_reset; greth->mdio->priv = greth; greth->mdio->irq = greth->mdio_irqs;
Signature · 1 line
1.8.3.2
Florian Fainelli
maintainerPATCH 2/14 tg3: remove empty MDIO bus reset function
In reply to Florian Fainellitg3_mdio_reset() does nothing useful and is optional for the MDIO bus code, so let's just remove it.
--- drivers/net/ethernet/broadcom/tg3.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/net/ethernet/broadcom/tg3.c +0 -6
@@ -1401,11 +1401,6 @@ static int tg3_mdio_write(struct mii_bus *bp, int mii_id, int reg, u16 val)return ret; } -static int tg3_mdio_reset (struct mii_bus *bp) -{ -return 0 ; -} -static void tg3_mdio_config_5785 (struct tg3 *tp) {u32 val;
@@ -1542,7 +1537,6 @@ static int tg3_mdio_init(struct tg3 *tp) tp->mdio_bus->parent = &tp->pdev->dev; tp->mdio_bus->read = &tg3_mdio_read; tp->mdio_bus->write = &tg3_mdio_write; - tp->mdio_bus->reset = &tg3_mdio_reset; tp->mdio_bus->phy_mask = ~(1 << tp->phy_addr); tp->mdio_bus->irq = &tp->mdio_irq[0 ];
Signature · 1 line
1.8.3.2
Florian Fainelli
maintainerPATCH 3/14 macb: remove empty MDIO bus reset function
In reply to Florian Fainellimacb_mdio_reset() does nothing useful and is optional for the MDIO bus code, so let's just remove it.
--- drivers/net/ethernet/cadence/macb.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/net/ethernet/cadence/macb.c +0 -6
@@ -199,11 +199,6 @@ static int macb_mdio_write(struct mii_bus *bus, int mii_id, int regnum,return 0 ; } -static int macb_mdio_reset (struct mii_bus *bus) -{ -return 0 ; -} -/** * macb_set_tx_clk() - Set a clock to a new frequency * @clk Pointer to the clock to change
@@ -375,7 +370,6 @@ int macb_mii_init(struct macb *bp) bp->mii_bus->name ="MACB_mii_bus" ; bp->mii_bus->read = &macb_mdio_read; bp->mii_bus->write = &macb_mdio_write; - bp->mii_bus->reset = &macb_mdio_reset;snprintf (bp->mii_bus->id,MII_BUS_ID_SIZE ,"%s-%x" , bp->pdev->name, bp->pdev->id); bp->mii_bus->priv = bp;
Signature · 1 line
1.8.3.2
Florian Fainelli
maintainerPATCH 4/14 dnet: remove empty MDIO bus reset function
In reply to Florian Fainellidnet_mdio_reset() does nothing useful and is optional for the MDIO bus code, so let's just remove it.
--- drivers/net/ethernet/dnet.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/net/ethernet/dnet.c +0 -6
@@ -170,11 +170,6 @@ static int dnet_mdio_write(struct mii_bus *bus, int mii_id, int regnum,return 0 ; } -static int dnet_mdio_reset (struct mii_bus *bus) -{ -return 0 ; -} -static void dnet_handle_link_change (struct net_device *dev) {struct dnet *bp =netdev_priv (dev);
@@ -322,7 +317,6 @@ static int dnet_mii_init(struct dnet *bp) bp->mii_bus->name ="dnet_mii_bus" ; bp->mii_bus->read = &dnet_mdio_read; bp->mii_bus->write = &dnet_mdio_write; - bp->mii_bus->reset = &dnet_mdio_reset;snprintf (bp->mii_bus->id,MII_BUS_ID_SIZE ,"%s-%x" , bp->pdev->name, bp->pdev->id);
Signature · 1 line
1.8.3.2
Florian Fainelli
maintainerPATCH 5/14 net: ethoc: remove empty MDIO bus function
In reply to Florian Fainelliethoc_mdio_reset() does nothing useful and is optional for the MDIO bus code, so let's just remove it.
--- drivers/net/ethernet/ethoc.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/net/ethernet/ethoc.c +0 -6
@@ -660,11 +660,6 @@ static int ethoc_mdio_write(struct mii_bus *bus, int phy, int reg, u16 val)return -EBUSY ; } -static int ethoc_mdio_reset (struct mii_bus *bus) -{ -return 0 ; -} -static void ethoc_mdio_poll (struct net_device *dev) { }
@@ -1210,7 +1205,6 @@ static int ethoc_probe(struct platform_device *pdev) priv->mdio->name, pdev->id); priv->mdio->read = ethoc_mdio_read; priv->mdio->write = ethoc_mdio_write; - priv->mdio->reset = ethoc_mdio_reset; priv->mdio->priv = priv; priv->mdio->irq =kmalloc (sizeof (int ) *PHY_MAX_ADDR ,GFP_KERNEL );
Signature · 1 line
1.8.3.2
Florian Fainelli
maintainerPATCH 6/14 fec: remove empty MDIO bus function
In reply to Florian Fainellifec_enet_mdio_reset() does nothing useful and is optional for the MDIO bus code, so let's just remove it.
--- drivers/net/ethernet/freescale/fec_main.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/net/ethernet/freescale/fec_main.c +0 -6
@@ -1255,11 +1255,6 @@ static int fec_enet_mdio_write(struct mii_bus *bus, int mii_id, int regnum,return 0 ; } -static int fec_enet_mdio_reset (struct mii_bus *bus) -{ -return 0 ; -} -static int fec_enet_mii_probe (struct net_device *ndev) {struct fec_enet_private *fep =netdev_priv (ndev);
@@ -1384,7 +1379,6 @@ static int fec_enet_mii_init(struct platform_device *pdev) fep->mii_bus->name ="fec_enet_mii_bus" ; fep->mii_bus->read = fec_enet_mdio_read; fep->mii_bus->write = fec_enet_mdio_write; - fep->mii_bus->reset = fec_enet_mdio_reset;snprintf (fep->mii_bus->id,MII_BUS_ID_SIZE ,"%s-%x" , pdev->name, fep->dev_id +1 ); fep->mii_bus->priv = fep;
Signature · 1 line
1.8.3.2
Florian Fainelli
maintainerPATCH 7/14 fs_enet: remove empty MDIO bus function
In reply to Florian Fainellifs_enet_fec_mii_reset() does nothing useful and is optional for the MDIO bus code, so let's just remove it.
--- drivers/net/ethernet/freescale/fs_enet/mii-fec.c | 7 ------- 1 file changed, 7 deletions(-)
drivers/net/ethernet/freescale/fs_enet/mii-fec.c +0 -7
@@ -95,12 +95,6 @@ static int fs_enet_fec_mii_write(struct mii_bus *bus, int phy_id, int location, } -static int fs_enet_fec_mii_reset (struct mii_bus *bus) -{ -/* nothing here - for now */ -return 0 ; -} -static struct of_device_id fs_enet_mdio_fec_match[];static int fs_enet_mdio_probe (struct platform_device *ofdev) {
@@ -128,7 +122,6 @@ static int fs_enet_mdio_probe(struct platform_device *ofdev) new_bus->name ="FEC MII Bus" ; new_bus->read = &fs_enet_fec_mii_read; new_bus->write = &fs_enet_fec_mii_write; - new_bus->reset = &fs_enet_fec_mii_reset; ret =of_address_to_resource (ofdev->dev.of_node,0 , &res);if (ret)
Signature · 1 line
1.8.3.2
Florian Fainelli
maintainerPATCH 8/14 net: mvmdio: remove empty MDIO bus reset function
In reply to Florian Fainelliorion_mdio_reset() does nothing useful and is optional for the MDIO bus code, so let's just remove it.
--- drivers/net/ethernet/marvell/mvmdio.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/net/ethernet/marvell/mvmdio.c +0 -6
@@ -167,11 +167,6 @@ out:return ret; } -static int orion_mdio_reset (struct mii_bus *bus) -{ -return 0 ; -} -static irqreturn_t orion_mdio_err_irq (int irq,void *dev_id) {struct orion_mdio_dev *dev = dev_id;
@@ -209,7 +204,6 @@ static int orion_mdio_probe(struct platform_device *pdev) bus->name ="orion_mdio_bus" ; bus->read = orion_mdio_read; bus->write = orion_mdio_write; - bus->reset = orion_mdio_reset;snprintf (bus->id,MII_BUS_ID_SIZE ,"%s-mii" ,dev_name (&pdev->dev)); bus->parent = &pdev->dev;
Signature · 1 line
1.8.3.2
Florian Fainelli
maintainerPATCH 9/14 net: emaclite: remove empty MDIO bus reset function
In reply to Florian Fainellixemaclite_mdio_reset() does nothing useful and is optional for the MDIO bus code, so let's just remove it.
--- drivers/net/ethernet/xilinx/xilinx_emaclite.c | 13 ------------- 1 file changed, 13 deletions(-)
drivers/net/ethernet/xilinx/xilinx_emaclite.c +0 -13
@@ -795,18 +795,6 @@ static int xemaclite_mdio_write(struct mii_bus *bus, int phy_id, int reg, }/** -* xemaclite_mdio_reset - Reset the mdio bus. -* @bus: Pointer to the MII bus -* -* This function is required(?) as per Documentation/networking/phy.txt. -* There is no reset in this device; this function always returns 0. -*/ -static int xemaclite_mdio_reset (struct mii_bus *bus) -{ -return 0 ; -} - -/** * xemaclite_mdio_setup - Register mii_bus for the Emaclite device * @lp: Pointer to the Emaclite device private data * @ofdev: Pointer to OF device structure
@@ -861,7 +849,6 @@ static int xemaclite_mdio_setup(struct net_local *lp, struct device *dev) bus->name ="Xilinx Emaclite MDIO" ; bus->read = xemaclite_mdio_read; bus->write = xemaclite_mdio_write; - bus->reset = xemaclite_mdio_reset; bus->parent = dev; bus->irq = lp->mdio_irqs;/* preallocated IRQ table */
Signature · 1 line
1.8.3.2
Florian Fainelli
maintainerPATCH 10/14 net: sun4i: remove empty MDIO bus reset function
In reply to Florian Fainellisun4i_mdio_reset() does nothing useful and is optional for the MDIO bus code, so let's just remove it.
--- drivers/net/phy/mdio-sun4i.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/net/phy/mdio-sun4i.c +0 -6
@@ -90,11 +90,6 @@ static int sun4i_mdio_write(struct mii_bus *bus, int mii_id, int regnum,return 0 ; } -static int sun4i_mdio_reset (struct mii_bus *bus) -{ -return 0 ; -} -static int sun4i_mdio_probe (struct platform_device *pdev) {struct device_node *np = pdev->dev.of_node;
@@ -110,7 +105,6 @@ static int sun4i_mdio_probe(struct platform_device *pdev) bus->name ="sun4i_mii_bus" ; bus->read = &sun4i_mdio_read; bus->write = &sun4i_mdio_write; - bus->reset = &sun4i_mdio_reset;snprintf (bus->id,MII_BUS_ID_SIZE ,"%s-mii" ,dev_name (&pdev->dev)); bus->parent = &pdev->dev;
Signature · 1 line
1.8.3.2
Florian Fainelli
maintainerPATCH 11/14 net: ftgmac100: remove empty MDIO bus reset function
In reply to Florian Fainelliftgmac100_mdiobus_reset() does nothing useful and is optional for the MDIO bus code, so let's just remove it.
--- drivers/net/ethernet/faraday/ftgmac100.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/net/ethernet/faraday/ftgmac100.c +0 -6
@@ -940,11 +940,6 @@ static int ftgmac100_mdiobus_write(struct mii_bus *bus, int phy_addr,return -EIO ; } -static int ftgmac100_mdiobus_reset (struct mii_bus *bus) -{ -return 0 ; -} -/****************************************************************************** * struct ethtool_ops functions *****************************************************************************/
@@ -1262,7 +1257,6 @@ static int ftgmac100_probe(struct platform_device *pdev) priv->mii_bus->priv = netdev; priv->mii_bus->read = ftgmac100_mdiobus_read; priv->mii_bus->write = ftgmac100_mdiobus_write; - priv->mii_bus->reset = ftgmac100_mdiobus_reset; priv->mii_bus->irq = priv->phy_irq;for (i =0 ; i <PHY_MAX_ADDR ; i++)
Signature · 1 line
1.8.3.2
Florian Fainelli
maintainerPATCH 12/14 r6040: remove empty MDIO bus reset function
In reply to Florian Fainellir6040_mdiobus_reset() does nothing useful and is optional for the MDIO bus code, so let's just remove it.
--- drivers/net/ethernet/rdc/r6040.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/net/ethernet/rdc/r6040.c +0 -6
@@ -270,11 +270,6 @@ static int r6040_mdiobus_write(struct mii_bus *bus, int phy_addr,return r6040_phy_write (ioaddr, phy_addr, reg, value); } -static int r6040_mdiobus_reset (struct mii_bus *bus) -{ -return 0 ; -} -static void r6040_free_txbufs (struct net_device *dev) {struct r6040_private *lp =netdev_priv (dev);
@@ -1191,7 +1186,6 @@ static int r6040_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) lp->mii_bus->priv = dev; lp->mii_bus->read = r6040_mdiobus_read; lp->mii_bus->write = r6040_mdiobus_write; - lp->mii_bus->reset = r6040_mdiobus_reset; lp->mii_bus->name ="r6040_eth_mii" ;snprintf (lp->mii_bus->id,MII_BUS_ID_SIZE ,"%s-%x" ,dev_name (&pdev->dev), card_idx);
Signature · 1 line
1.8.3.2
Florian Fainelli
maintainerPATCH 13/14 bfin_mac: remove empty MDIO bus reset function
In reply to Florian Fainellibfin_mdiobus_reset() does nothing useful and is optional for the MDIO bus code, so let's just remove it.
--- drivers/net/ethernet/adi/bfin_mac.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/net/ethernet/adi/bfin_mac.c +0 -6
@@ -307,11 +307,6 @@ static int bfin_mdiobus_write(struct mii_bus *bus, int phy_addr, int regnum,return bfin_mdio_poll (); } -static int bfin_mdiobus_reset (struct mii_bus *bus) -{ -return 0 ; -} -static void bfin_mac_adjust_link (struct net_device *dev) {struct bfin_mac_local *lp =netdev_priv (dev);
@@ -1824,7 +1819,6 @@ static int bfin_mii_bus_probe(struct platform_device *pdev) goto out_err_alloc; miibus->read = bfin_mdiobus_read; miibus->write = bfin_mdiobus_write; - miibus->reset = bfin_mdiobus_reset; miibus->parent = &pdev->dev; miibus->name ="bfin_mii_bus" ;
Signature · 1 line
1.8.3.2
Florian Fainelli
maintainerPATCH 14/14 Documentation: networking: phy.txt: MDIO bus reset is optional
In reply to Florian FainelliUpdate the MDIO bus documentation to mention that the MDIO bus reset function is completely optional. It became optional with commit e13934563db0 ("[PATCH] PHY Layer fixup")
--- Documentation/networking/phy.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/networking/phy.txt +1 -1
@@ -48,7 +48,7 @@ The MDIO bus time, so it is safe for them to block, waiting for an interrupt to signal the operation is complete - 2) A reset function is necessary. This is used to return the bus to an + 2) A reset function is optional. This is used to return the bus to an initialized state. 3) A probe function is needed. This function should set up anything the bus
Signature · 1 line
1.8.3.2
David Miller
maintainerFrom: Florian Fainelli <[email protected]>
Date: Wed, 26 Mar 2014 18:07:12 -0700
Quoted 9 lines
This patchset removes all empty MDIO bus reset functions that we have in the tree (hopefully all of them). This function is optional for the MDIO bus code in drivers/net/phy/mdio_bus.c::mdiobus_register, the documentation is updated to reflect that.
Having less call sites to update will allow us to implement a generic
BMCR_RESETbased PHY reset for MDIO buses that require to reset their PHYs before their PHY detection succeeds (e.g: HiSilicon hip04 current submission) and provide it as a helper.
Series applied, thanks.
Florian Fainelli
maintainer2014-03-26 21:19 GMT-07:00 David Miller <[email protected]>:
Quoted 8 lines
From: Florian Fainelli <[email protected]>
Date: Wed, 26 Mar 2014 18:07:12 -0700Quoted 5 lines
This patchset removes all empty MDIO bus reset functions that we have in the tree (hopefully all of them). This function is optional for the MDIO bus code in drivers/net/phy/mdio_bus.c::mdiobus_register, the documentation is updated to reflect that.
Quoted 6 lines
Quoted 4 lines
Having less call sites to update will allow us to implement a generic
BMCR_RESETbased PHY reset for MDIO buses that require to reset their PHYs before their PHY detection succeeds (e.g: HiSilicon hip04 current submission) and provide it as a helper.Series applied, thanks.
Did you apply it locally but did not push it to net-next.git yet? I can see the tipc changes you just replied to, but not those patches.
Thanks!
Signature · 1 line
Florian
David Miller
maintainerFrom: Florian Fainelli <[email protected]>
Date: Thu, 27 Mar 2014 10:17:02 -0700
Quoted 14 lines
2014-03-26 21:19 GMT-07:00 David Miller <[email protected]>:
Quoted 13 lines
From: Florian Fainelli <[email protected]>
Date: Wed, 26 Mar 2014 18:07:12 -0700Quoted 9 lines
This patchset removes all empty MDIO bus reset functions that we have in the tree (hopefully all of them). This function is optional for the MDIO bus code in drivers/net/phy/mdio_bus.c::mdiobus_register, the documentation is updated to reflect that.
Having less call sites to update will allow us to implement a generic
BMCR_RESETbased PHY reset for MDIO buses that require to reset their PHYs before their PHY detection succeeds (e.g: HiSilicon hip04 current submission) and provide it as a helper.
Quoted 4 lines
Quoted 1 line
Series applied, thanks.
Did you apply it locally but did not push it to net-next.git yet? I can see the tipc changes you just replied to, but not those patches.
Sorry about that.
It's on my home system, I'll push it out when I get homne from the office today.