* [PATCH net-next 00/14] net: remove empty MDIO bus reset functions
@ 2014-03-27 1:07 Florian Fainelli
2014-03-27 1:07 ` [PATCH net-next 01/14] net: greth: remove empty MDIO bus reset function Florian Fainelli
` (14 more replies)
0 siblings, 15 replies; 18+ messages in thread
From: Florian Fainelli @ 2014-03-27 1:07 UTC (permalink / raw)
To: netdev; +Cc: davem, Florian Fainelli
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(-)
--
1.8.3.2
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH net-next 01/14] net: greth: remove empty MDIO bus reset function
2014-03-27 1:07 [PATCH net-next 00/14] net: remove empty MDIO bus reset functions Florian Fainelli
@ 2014-03-27 1:07 ` Florian Fainelli
2014-03-27 1:07 ` [PATCH net-next 02/14] tg3: " Florian Fainelli
` (13 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: Florian Fainelli @ 2014-03-27 1:07 UTC (permalink / raw)
To: netdev; +Cc: davem, Florian Fainelli
greth_mdio_reset() does nothing useful and this function is optional for
the MDIO bus code, so let's just remove it.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/net/ethernet/aeroflex/greth.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/net/ethernet/aeroflex/greth.c b/drivers/net/ethernet/aeroflex/greth.c
index c5d75e7aeeb6..23578dfee249 100644
--- a/drivers/net/ethernet/aeroflex/greth.c
+++ b/drivers/net/ethernet/aeroflex/greth.c
@@ -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;
--
1.8.3.2
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH net-next 02/14] tg3: remove empty MDIO bus reset function
2014-03-27 1:07 [PATCH net-next 00/14] net: remove empty MDIO bus reset functions Florian Fainelli
2014-03-27 1:07 ` [PATCH net-next 01/14] net: greth: remove empty MDIO bus reset function Florian Fainelli
@ 2014-03-27 1:07 ` Florian Fainelli
2014-03-27 1:07 ` [PATCH net-next 03/14] macb: " Florian Fainelli
` (12 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: Florian Fainelli @ 2014-03-27 1:07 UTC (permalink / raw)
To: netdev; +Cc: davem, Florian Fainelli
tg3_mdio_reset() does nothing useful and is optional for the MDIO bus
code, so let's just remove it.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/net/ethernet/broadcom/tg3.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/tg3.c b/drivers/net/ethernet/broadcom/tg3.c
index 37422af9ef13..1ac461a7d949 100644
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -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];
--
1.8.3.2
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH net-next 03/14] macb: remove empty MDIO bus reset function
2014-03-27 1:07 [PATCH net-next 00/14] net: remove empty MDIO bus reset functions Florian Fainelli
2014-03-27 1:07 ` [PATCH net-next 01/14] net: greth: remove empty MDIO bus reset function Florian Fainelli
2014-03-27 1:07 ` [PATCH net-next 02/14] tg3: " Florian Fainelli
@ 2014-03-27 1:07 ` Florian Fainelli
2014-03-27 1:07 ` [PATCH net-next 04/14] dnet: " Florian Fainelli
` (11 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: Florian Fainelli @ 2014-03-27 1:07 UTC (permalink / raw)
To: netdev; +Cc: davem, Florian Fainelli
macb_mdio_reset() does nothing useful and is optional for the MDIO bus
code, so let's just remove it.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/net/ethernet/cadence/macb.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c
index 6116887d2880..ca97005e24b4 100644
--- a/drivers/net/ethernet/cadence/macb.c
+++ b/drivers/net/ethernet/cadence/macb.c
@@ -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;
--
1.8.3.2
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH net-next 04/14] dnet: remove empty MDIO bus reset function
2014-03-27 1:07 [PATCH net-next 00/14] net: remove empty MDIO bus reset functions Florian Fainelli
` (2 preceding siblings ...)
2014-03-27 1:07 ` [PATCH net-next 03/14] macb: " Florian Fainelli
@ 2014-03-27 1:07 ` Florian Fainelli
2014-03-27 1:07 ` [PATCH net-next 05/14] net: ethoc: remove empty MDIO bus function Florian Fainelli
` (10 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: Florian Fainelli @ 2014-03-27 1:07 UTC (permalink / raw)
To: netdev; +Cc: davem, Florian Fainelli
dnet_mdio_reset() does nothing useful and is optional for the MDIO bus
code, so let's just remove it.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/net/ethernet/dnet.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/net/ethernet/dnet.c b/drivers/net/ethernet/dnet.c
index 8a79a32a5674..e9b0faba3078 100644
--- a/drivers/net/ethernet/dnet.c
+++ b/drivers/net/ethernet/dnet.c
@@ -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);
--
1.8.3.2
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH net-next 05/14] net: ethoc: remove empty MDIO bus function
2014-03-27 1:07 [PATCH net-next 00/14] net: remove empty MDIO bus reset functions Florian Fainelli
` (3 preceding siblings ...)
2014-03-27 1:07 ` [PATCH net-next 04/14] dnet: " Florian Fainelli
@ 2014-03-27 1:07 ` Florian Fainelli
2014-03-27 1:07 ` [PATCH net-next 06/14] fec: " Florian Fainelli
` (9 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: Florian Fainelli @ 2014-03-27 1:07 UTC (permalink / raw)
To: netdev; +Cc: davem, Florian Fainelli
ethoc_mdio_reset() does nothing useful and is optional for the MDIO bus
code, so let's just remove it.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/net/ethernet/ethoc.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/net/ethernet/ethoc.c b/drivers/net/ethernet/ethoc.c
index 55e0fa03dc90..8b70ca7e342b 100644
--- a/drivers/net/ethernet/ethoc.c
+++ b/drivers/net/ethernet/ethoc.c
@@ -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);
--
1.8.3.2
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH net-next 06/14] fec: remove empty MDIO bus function
2014-03-27 1:07 [PATCH net-next 00/14] net: remove empty MDIO bus reset functions Florian Fainelli
` (4 preceding siblings ...)
2014-03-27 1:07 ` [PATCH net-next 05/14] net: ethoc: remove empty MDIO bus function Florian Fainelli
@ 2014-03-27 1:07 ` Florian Fainelli
2014-03-27 1:07 ` [PATCH net-next 07/14] fs_enet: " Florian Fainelli
` (8 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: Florian Fainelli @ 2014-03-27 1:07 UTC (permalink / raw)
To: netdev; +Cc: davem, Florian Fainelli
fec_enet_mdio_reset() does nothing useful and is optional for the MDIO
bus code, so let's just remove it.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/net/ethernet/freescale/fec_main.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index f9f8a589cdef..e19315eaf2dd 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -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;
--
1.8.3.2
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH net-next 07/14] fs_enet: remove empty MDIO bus function
2014-03-27 1:07 [PATCH net-next 00/14] net: remove empty MDIO bus reset functions Florian Fainelli
` (5 preceding siblings ...)
2014-03-27 1:07 ` [PATCH net-next 06/14] fec: " Florian Fainelli
@ 2014-03-27 1:07 ` Florian Fainelli
2014-03-27 1:07 ` [PATCH net-next 08/14] net: mvmdio: remove empty MDIO bus reset function Florian Fainelli
` (7 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: Florian Fainelli @ 2014-03-27 1:07 UTC (permalink / raw)
To: netdev; +Cc: davem, Florian Fainelli
fs_enet_fec_mii_reset() does nothing useful and is optional for the MDIO
bus code, so let's just remove it.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/net/ethernet/freescale/fs_enet/mii-fec.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/drivers/net/ethernet/freescale/fs_enet/mii-fec.c b/drivers/net/ethernet/freescale/fs_enet/mii-fec.c
index 7e69c983d12a..ebf5d6429a8d 100644
--- a/drivers/net/ethernet/freescale/fs_enet/mii-fec.c
+++ b/drivers/net/ethernet/freescale/fs_enet/mii-fec.c
@@ -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)
--
1.8.3.2
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH net-next 08/14] net: mvmdio: remove empty MDIO bus reset function
2014-03-27 1:07 [PATCH net-next 00/14] net: remove empty MDIO bus reset functions Florian Fainelli
` (6 preceding siblings ...)
2014-03-27 1:07 ` [PATCH net-next 07/14] fs_enet: " Florian Fainelli
@ 2014-03-27 1:07 ` Florian Fainelli
2014-03-27 1:07 ` [PATCH net-next 09/14] net: emaclite: " Florian Fainelli
` (6 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: Florian Fainelli @ 2014-03-27 1:07 UTC (permalink / raw)
To: netdev; +Cc: davem, Florian Fainelli
orion_mdio_reset() does nothing useful and is optional for the MDIO bus
code, so let's just remove it.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/net/ethernet/marvell/mvmdio.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/net/ethernet/marvell/mvmdio.c b/drivers/net/ethernet/marvell/mvmdio.c
index fd409d76b811..b161a525fc5b 100644
--- a/drivers/net/ethernet/marvell/mvmdio.c
+++ b/drivers/net/ethernet/marvell/mvmdio.c
@@ -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;
--
1.8.3.2
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH net-next 09/14] net: emaclite: remove empty MDIO bus reset function
2014-03-27 1:07 [PATCH net-next 00/14] net: remove empty MDIO bus reset functions Florian Fainelli
` (7 preceding siblings ...)
2014-03-27 1:07 ` [PATCH net-next 08/14] net: mvmdio: remove empty MDIO bus reset function Florian Fainelli
@ 2014-03-27 1:07 ` Florian Fainelli
2014-03-27 1:07 ` [PATCH net-next 10/14] net: sun4i: " Florian Fainelli
` (5 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: Florian Fainelli @ 2014-03-27 1:07 UTC (permalink / raw)
To: netdev; +Cc: davem, Florian Fainelli
xemaclite_mdio_reset() does nothing useful and is optional for the MDIO
bus code, so let's just remove it.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/net/ethernet/xilinx/xilinx_emaclite.c | 13 -------------
1 file changed, 13 deletions(-)
diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
index 58756617644f..0d87c67a5ff7 100644
--- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c
+++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
@@ -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 */
--
1.8.3.2
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH net-next 10/14] net: sun4i: remove empty MDIO bus reset function
2014-03-27 1:07 [PATCH net-next 00/14] net: remove empty MDIO bus reset functions Florian Fainelli
` (8 preceding siblings ...)
2014-03-27 1:07 ` [PATCH net-next 09/14] net: emaclite: " Florian Fainelli
@ 2014-03-27 1:07 ` Florian Fainelli
2014-03-27 1:07 ` [PATCH net-next 11/14] net: ftgmac100: " Florian Fainelli
` (4 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: Florian Fainelli @ 2014-03-27 1:07 UTC (permalink / raw)
To: netdev; +Cc: davem, Florian Fainelli
sun4i_mdio_reset() does nothing useful and is optional for the MDIO bus
code, so let's just remove it.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/net/phy/mdio-sun4i.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/net/phy/mdio-sun4i.c b/drivers/net/phy/mdio-sun4i.c
index 9367acc84fbb..15bc7f9ea224 100644
--- a/drivers/net/phy/mdio-sun4i.c
+++ b/drivers/net/phy/mdio-sun4i.c
@@ -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;
--
1.8.3.2
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH net-next 11/14] net: ftgmac100: remove empty MDIO bus reset function
2014-03-27 1:07 [PATCH net-next 00/14] net: remove empty MDIO bus reset functions Florian Fainelli
` (9 preceding siblings ...)
2014-03-27 1:07 ` [PATCH net-next 10/14] net: sun4i: " Florian Fainelli
@ 2014-03-27 1:07 ` Florian Fainelli
2014-03-27 1:07 ` [PATCH net-next 12/14] r6040: " Florian Fainelli
` (3 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: Florian Fainelli @ 2014-03-27 1:07 UTC (permalink / raw)
To: netdev; +Cc: davem, Florian Fainelli
ftgmac100_mdiobus_reset() does nothing useful and is optional for the
MDIO bus code, so let's just remove it.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/net/ethernet/faraday/ftgmac100.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c
index c11ecbc98149..68069eabc4f8 100644
--- a/drivers/net/ethernet/faraday/ftgmac100.c
+++ b/drivers/net/ethernet/faraday/ftgmac100.c
@@ -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++)
--
1.8.3.2
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH net-next 12/14] r6040: remove empty MDIO bus reset function
2014-03-27 1:07 [PATCH net-next 00/14] net: remove empty MDIO bus reset functions Florian Fainelli
` (10 preceding siblings ...)
2014-03-27 1:07 ` [PATCH net-next 11/14] net: ftgmac100: " Florian Fainelli
@ 2014-03-27 1:07 ` Florian Fainelli
2014-03-27 1:07 ` [PATCH net-next 13/14] bfin_mac: " Florian Fainelli
` (2 subsequent siblings)
14 siblings, 0 replies; 18+ messages in thread
From: Florian Fainelli @ 2014-03-27 1:07 UTC (permalink / raw)
To: netdev; +Cc: davem, Florian Fainelli
r6040_mdiobus_reset() does nothing useful and is optional for the MDIO
bus code, so let's just remove it.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/net/ethernet/rdc/r6040.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/net/ethernet/rdc/r6040.c b/drivers/net/ethernet/rdc/r6040.c
index 819b74cefd64..cd045ecb9816 100644
--- a/drivers/net/ethernet/rdc/r6040.c
+++ b/drivers/net/ethernet/rdc/r6040.c
@@ -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);
--
1.8.3.2
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH net-next 13/14] bfin_mac: remove empty MDIO bus reset function
2014-03-27 1:07 [PATCH net-next 00/14] net: remove empty MDIO bus reset functions Florian Fainelli
` (11 preceding siblings ...)
2014-03-27 1:07 ` [PATCH net-next 12/14] r6040: " Florian Fainelli
@ 2014-03-27 1:07 ` Florian Fainelli
2014-03-27 1:07 ` [PATCH net-next 14/14] Documentation: networking: phy.txt: MDIO bus reset is optional Florian Fainelli
2014-03-27 4:19 ` [PATCH net-next 00/14] net: remove empty MDIO bus reset functions David Miller
14 siblings, 0 replies; 18+ messages in thread
From: Florian Fainelli @ 2014-03-27 1:07 UTC (permalink / raw)
To: netdev; +Cc: davem, Florian Fainelli
bfin_mdiobus_reset() does nothing useful and is optional for the MDIO
bus code, so let's just remove it.
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
drivers/net/ethernet/adi/bfin_mac.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/drivers/net/ethernet/adi/bfin_mac.c b/drivers/net/ethernet/adi/bfin_mac.c
index 95779b6b7394..7ae74d450e8f 100644
--- a/drivers/net/ethernet/adi/bfin_mac.c
+++ b/drivers/net/ethernet/adi/bfin_mac.c
@@ -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";
--
1.8.3.2
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH net-next 14/14] Documentation: networking: phy.txt: MDIO bus reset is optional
2014-03-27 1:07 [PATCH net-next 00/14] net: remove empty MDIO bus reset functions Florian Fainelli
` (12 preceding siblings ...)
2014-03-27 1:07 ` [PATCH net-next 13/14] bfin_mac: " Florian Fainelli
@ 2014-03-27 1:07 ` Florian Fainelli
2014-03-27 4:19 ` [PATCH net-next 00/14] net: remove empty MDIO bus reset functions David Miller
14 siblings, 0 replies; 18+ messages in thread
From: Florian Fainelli @ 2014-03-27 1:07 UTC (permalink / raw)
To: netdev; +Cc: davem, Florian Fainelli
Update 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")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
Documentation/networking/phy.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/networking/phy.txt b/Documentation/networking/phy.txt
index e602c6f347df..3544c98401fd 100644
--- a/Documentation/networking/phy.txt
+++ b/Documentation/networking/phy.txt
@@ -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
--
1.8.3.2
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH net-next 00/14] net: remove empty MDIO bus reset functions
2014-03-27 1:07 [PATCH net-next 00/14] net: remove empty MDIO bus reset functions Florian Fainelli
` (13 preceding siblings ...)
2014-03-27 1:07 ` [PATCH net-next 14/14] Documentation: networking: phy.txt: MDIO bus reset is optional Florian Fainelli
@ 2014-03-27 4:19 ` David Miller
2014-03-27 17:17 ` Florian Fainelli
14 siblings, 1 reply; 18+ messages in thread
From: David Miller @ 2014-03-27 4:19 UTC (permalink / raw)
To: f.fainelli; +Cc: netdev
From: Florian Fainelli <f.fainelli@gmail.com>
Date: Wed, 26 Mar 2014 18:07:12 -0700
> 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.
Series applied, thanks.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH net-next 00/14] net: remove empty MDIO bus reset functions
2014-03-27 4:19 ` [PATCH net-next 00/14] net: remove empty MDIO bus reset functions David Miller
@ 2014-03-27 17:17 ` Florian Fainelli
2014-03-27 18:40 ` David Miller
0 siblings, 1 reply; 18+ messages in thread
From: Florian Fainelli @ 2014-03-27 17:17 UTC (permalink / raw)
To: David Miller; +Cc: netdev
2014-03-26 21:19 GMT-07:00 David Miller <davem@davemloft.net>:
> From: Florian Fainelli <f.fainelli@gmail.com>
> Date: Wed, 26 Mar 2014 18:07:12 -0700
>
>> 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.
>
> 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!
--
Florian
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH net-next 00/14] net: remove empty MDIO bus reset functions
2014-03-27 17:17 ` Florian Fainelli
@ 2014-03-27 18:40 ` David Miller
0 siblings, 0 replies; 18+ messages in thread
From: David Miller @ 2014-03-27 18:40 UTC (permalink / raw)
To: f.fainelli; +Cc: netdev
From: Florian Fainelli <f.fainelli@gmail.com>
Date: Thu, 27 Mar 2014 10:17:02 -0700
> 2014-03-26 21:19 GMT-07:00 David Miller <davem@davemloft.net>:
>> From: Florian Fainelli <f.fainelli@gmail.com>
>> Date: Wed, 26 Mar 2014 18:07:12 -0700
>>
>>> 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.
>>
>> 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.
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2014-03-27 18:40 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-27 1:07 [PATCH net-next 00/14] net: remove empty MDIO bus reset functions Florian Fainelli
2014-03-27 1:07 ` [PATCH net-next 01/14] net: greth: remove empty MDIO bus reset function Florian Fainelli
2014-03-27 1:07 ` [PATCH net-next 02/14] tg3: " Florian Fainelli
2014-03-27 1:07 ` [PATCH net-next 03/14] macb: " Florian Fainelli
2014-03-27 1:07 ` [PATCH net-next 04/14] dnet: " Florian Fainelli
2014-03-27 1:07 ` [PATCH net-next 05/14] net: ethoc: remove empty MDIO bus function Florian Fainelli
2014-03-27 1:07 ` [PATCH net-next 06/14] fec: " Florian Fainelli
2014-03-27 1:07 ` [PATCH net-next 07/14] fs_enet: " Florian Fainelli
2014-03-27 1:07 ` [PATCH net-next 08/14] net: mvmdio: remove empty MDIO bus reset function Florian Fainelli
2014-03-27 1:07 ` [PATCH net-next 09/14] net: emaclite: " Florian Fainelli
2014-03-27 1:07 ` [PATCH net-next 10/14] net: sun4i: " Florian Fainelli
2014-03-27 1:07 ` [PATCH net-next 11/14] net: ftgmac100: " Florian Fainelli
2014-03-27 1:07 ` [PATCH net-next 12/14] r6040: " Florian Fainelli
2014-03-27 1:07 ` [PATCH net-next 13/14] bfin_mac: " Florian Fainelli
2014-03-27 1:07 ` [PATCH net-next 14/14] Documentation: networking: phy.txt: MDIO bus reset is optional Florian Fainelli
2014-03-27 4:19 ` [PATCH net-next 00/14] net: remove empty MDIO bus reset functions David Miller
2014-03-27 17:17 ` Florian Fainelli
2014-03-27 18:40 ` 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).