* [PATCH 00/21] NET: use unique MDIO bus names
@ 2012-01-10 9:59 Florian Fainelli
2012-01-10 9:59 ` [PATCH 01/21] ax88796: use an unique MDIO bus name Florian Fainelli
` (21 more replies)
0 siblings, 22 replies; 26+ messages in thread
From: Florian Fainelli @ 2012-01-10 9:59 UTC (permalink / raw)
To: netdev; +Cc: Florian Fainelli
While troubleshooting an issue with an user of the RDC r6040 driver
having compiled support for the fixed MDIO bus, I noticed that quite
some network drivers will have a MDIO bus named "0" most of the time.
Some network drivers already try to provide an unique MDIO bus name
using their PCI slot and function, this is okay.
Some other network drivers will format the name using their platform_device
id, which will usually result in a collision with the fixed MDIO bus
name ("0"), these drivers are fixed to use the following pattern instead:
<platform_device name>-<platform device id> which is unique
Finally the MDIO bus drivers themselves are patched to use an unique name
as well.
There is a potential to break user-space applications assuming there is a
specific MDIO bus named "0", "1" or other non-explanatory names like this.
Note that I compile tested most of the drivers on x86 and MIPS, ARM and Blackfin
drivers have not been compile tested.
Florian Fainelli (21):
ax88796: use an unique MDIO bus name.
bfin_mac: use an unique MDIO bus name.
au1000-eth: use an unique MDIO bus name.
sb1250: use an unique MDIO bus name.
macb: use an unique MDIO bus name.
dnet: use an unique MDIO bus name.
fec: use an unique MDIO bus name.
lantiq_etop: use an unique MDIO bus name.
mv643xx-eth: use an unique MDIO bus name.
pxa168-eth: use an unique MDIO bus name.
sh-eth: use an unique MDIO bus name.
s6gmac: use an unique MDIO bus name.
smsc911x: use an unique MDIO bus name.
stmmac: use an unique MDIO bus name.
cpmac: use an unique MDIO bus name.
davinci_emac: use an unique MDIO bus name.
ixp4xx-eth: use an unique MDIO bus name.
bcm63xx_enet: use an unique MDIO bus name.
phy/fixed: use an unique MDIO bus name.
mdio-gpio: use an unique MDIO bus name.
mdio-octeon: use an unique MDIO bus name.
drivers/net/ethernet/8390/ax88796.c | 3 ++-
drivers/net/ethernet/adi/bfin_mac.c | 3 ++-
drivers/net/ethernet/amd/au1000_eth.c | 3 ++-
drivers/net/ethernet/broadcom/bcm63xx_enet.c | 2 +-
drivers/net/ethernet/broadcom/sb1250-mac.c | 3 ++-
drivers/net/ethernet/cadence/macb.c | 3 ++-
drivers/net/ethernet/dnet.c | 3 ++-
drivers/net/ethernet/freescale/fec.c | 3 ++-
drivers/net/ethernet/lantiq_etop.c | 5 ++++-
drivers/net/ethernet/marvell/mv643xx_eth.c | 3 ++-
drivers/net/ethernet/marvell/pxa168_eth.c | 3 ++-
drivers/net/ethernet/renesas/sh_eth.c | 3 ++-
drivers/net/ethernet/s6gmac.c | 2 +-
drivers/net/ethernet/smsc/smsc911x.c | 3 ++-
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +-
drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 3 ++-
drivers/net/ethernet/ti/cpmac.c | 2 +-
drivers/net/ethernet/ti/davinci_mdio.c | 3 ++-
drivers/net/ethernet/xscale/ixp4xx_eth.c | 2 +-
drivers/net/phy/fixed.c | 2 +-
drivers/net/phy/mdio-gpio.c | 2 +-
drivers/net/phy/mdio-octeon.c | 3 ++-
22 files changed, 39 insertions(+), 22 deletions(-)
--
1.7.5.4
^ permalink raw reply [flat|nested] 26+ messages in thread
* [PATCH 01/21] ax88796: use an unique MDIO bus name.
2012-01-10 9:59 [PATCH 00/21] NET: use unique MDIO bus names Florian Fainelli
@ 2012-01-10 9:59 ` Florian Fainelli
2012-01-10 9:59 ` [PATCH 02/21] bfin_mac: " Florian Fainelli
` (20 subsequent siblings)
21 siblings, 0 replies; 26+ messages in thread
From: Florian Fainelli @ 2012-01-10 9:59 UTC (permalink / raw)
To: netdev
Cc: Florian Fainelli, David S. Miller, Jeff Kirsher, Jiri Pirko,
Wan ZongShun, Joe Perches, linux-kernel
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
drivers/net/ethernet/8390/ax88796.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/8390/ax88796.c b/drivers/net/ethernet/8390/ax88796.c
index 9e8ba4f..0f92e35 100644
--- a/drivers/net/ethernet/8390/ax88796.c
+++ b/drivers/net/ethernet/8390/ax88796.c
@@ -623,7 +623,8 @@ static int ax_mii_init(struct net_device *dev)
ax->mii_bus->name = "ax88796_mii_bus";
ax->mii_bus->parent = dev->dev.parent;
- snprintf(ax->mii_bus->id, MII_BUS_ID_SIZE, "%x", pdev->id);
+ snprintf(ax->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x",
+ pdev->name, pdev->id);
ax->mii_bus->irq = kmalloc(sizeof(int) * PHY_MAX_ADDR, GFP_KERNEL);
if (!ax->mii_bus->irq) {
--
1.7.5.4
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 02/21] bfin_mac: use an unique MDIO bus name.
2012-01-10 9:59 [PATCH 00/21] NET: use unique MDIO bus names Florian Fainelli
2012-01-10 9:59 ` [PATCH 01/21] ax88796: use an unique MDIO bus name Florian Fainelli
@ 2012-01-10 9:59 ` Florian Fainelli
2012-01-11 14:47 ` Bob Liu
2012-01-10 9:59 ` [PATCH 03/21] au1000-eth: " Florian Fainelli
` (19 subsequent siblings)
21 siblings, 1 reply; 26+ messages in thread
From: Florian Fainelli @ 2012-01-10 9:59 UTC (permalink / raw)
To: netdev
Cc: Florian Fainelli, David S. Miller, Jeff Kirsher, Jiri Pirko,
Bob Liu, uclinux-dist-devel, linux-kernel
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
drivers/net/ethernet/adi/bfin_mac.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/adi/bfin_mac.c b/drivers/net/ethernet/adi/bfin_mac.c
index b6d69c9..d812a10 100644
--- a/drivers/net/ethernet/adi/bfin_mac.c
+++ b/drivers/net/ethernet/adi/bfin_mac.c
@@ -1670,7 +1670,8 @@ static int __devinit bfin_mii_bus_probe(struct platform_device *pdev)
miibus->name = "bfin_mii_bus";
miibus->phy_mask = mii_bus_pd->phy_mask;
- snprintf(miibus->id, MII_BUS_ID_SIZE, "0");
+ snprintf(miibus->id, MII_BUS_ID_SIZE, "%s-%x",
+ pdev->name, pdev->id);
miibus->irq = kmalloc(sizeof(int)*PHY_MAX_ADDR, GFP_KERNEL);
if (!miibus->irq)
goto out_err_irq_alloc;
--
1.7.5.4
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 03/21] au1000-eth: use an unique MDIO bus name.
2012-01-10 9:59 [PATCH 00/21] NET: use unique MDIO bus names Florian Fainelli
2012-01-10 9:59 ` [PATCH 01/21] ax88796: use an unique MDIO bus name Florian Fainelli
2012-01-10 9:59 ` [PATCH 02/21] bfin_mac: " Florian Fainelli
@ 2012-01-10 9:59 ` Florian Fainelli
2012-01-10 9:59 ` [PATCH 04/21] sb1250: " Florian Fainelli
` (18 subsequent siblings)
21 siblings, 0 replies; 26+ messages in thread
From: Florian Fainelli @ 2012-01-10 9:59 UTC (permalink / raw)
To: netdev
Cc: Florian Fainelli, David S. Miller, Jeff Kirsher, Jiri Pirko,
Wan ZongShun, linux-kernel
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
drivers/net/ethernet/amd/au1000_eth.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/amd/au1000_eth.c b/drivers/net/ethernet/amd/au1000_eth.c
index cc9262b..8b95dd3 100644
--- a/drivers/net/ethernet/amd/au1000_eth.c
+++ b/drivers/net/ethernet/amd/au1000_eth.c
@@ -1171,7 +1171,8 @@ static int __devinit au1000_probe(struct platform_device *pdev)
aup->mii_bus->write = au1000_mdiobus_write;
aup->mii_bus->reset = au1000_mdiobus_reset;
aup->mii_bus->name = "au1000_eth_mii";
- snprintf(aup->mii_bus->id, MII_BUS_ID_SIZE, "%x", aup->mac_id);
+ snprintf(aup->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x",
+ pdev->name, aup->mac_id);
aup->mii_bus->irq = kmalloc(sizeof(int)*PHY_MAX_ADDR, GFP_KERNEL);
if (aup->mii_bus->irq == NULL)
goto err_out;
--
1.7.5.4
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 04/21] sb1250: use an unique MDIO bus name.
2012-01-10 9:59 [PATCH 00/21] NET: use unique MDIO bus names Florian Fainelli
` (2 preceding siblings ...)
2012-01-10 9:59 ` [PATCH 03/21] au1000-eth: " Florian Fainelli
@ 2012-01-10 9:59 ` Florian Fainelli
2012-01-10 9:59 ` [PATCH 05/21] macb: " Florian Fainelli
` (17 subsequent siblings)
21 siblings, 0 replies; 26+ messages in thread
From: Florian Fainelli @ 2012-01-10 9:59 UTC (permalink / raw)
To: netdev
Cc: Florian Fainelli, David S. Miller, Jeff Kirsher, Jiri Pirko,
Wan ZongShun, Joe Perches, linux-kernel
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
drivers/net/ethernet/broadcom/sb1250-mac.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/sb1250-mac.c b/drivers/net/ethernet/broadcom/sb1250-mac.c
index 8fa7abc..084904c 100644
--- a/drivers/net/ethernet/broadcom/sb1250-mac.c
+++ b/drivers/net/ethernet/broadcom/sb1250-mac.c
@@ -2259,7 +2259,8 @@ static int sbmac_init(struct platform_device *pldev, long long base)
}
sc->mii_bus->name = sbmac_mdio_string;
- snprintf(sc->mii_bus->id, MII_BUS_ID_SIZE, "%x", idx);
+ snprintf(sc->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x",
+ pldev->name, idx);
sc->mii_bus->priv = sc;
sc->mii_bus->read = sbmac_mii_read;
sc->mii_bus->write = sbmac_mii_write;
--
1.7.5.4
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 05/21] macb: use an unique MDIO bus name.
2012-01-10 9:59 [PATCH 00/21] NET: use unique MDIO bus names Florian Fainelli
` (3 preceding siblings ...)
2012-01-10 9:59 ` [PATCH 04/21] sb1250: " Florian Fainelli
@ 2012-01-10 9:59 ` Florian Fainelli
2012-01-10 10:01 ` Nicolas Ferre
2012-01-10 9:59 ` [PATCH 06/21] dnet: " Florian Fainelli
` (16 subsequent siblings)
21 siblings, 1 reply; 26+ messages in thread
From: Florian Fainelli @ 2012-01-10 9:59 UTC (permalink / raw)
To: netdev; +Cc: Florian Fainelli, Nicolas Ferre, linux-kernel
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
drivers/net/ethernet/cadence/macb.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c
index a437b46..49508b7 100644
--- a/drivers/net/ethernet/cadence/macb.c
+++ b/drivers/net/ethernet/cadence/macb.c
@@ -244,7 +244,8 @@ static int macb_mii_init(struct macb *bp)
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, "%x", bp->pdev->id);
+ snprintf(bp->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x",
+ bp->pdev->name, bp->pdev->id);
bp->mii_bus->priv = bp;
bp->mii_bus->parent = &bp->dev->dev;
pdata = bp->pdev->dev.platform_data;
--
1.7.5.4
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 06/21] dnet: use an unique MDIO bus name.
2012-01-10 9:59 [PATCH 00/21] NET: use unique MDIO bus names Florian Fainelli
` (4 preceding siblings ...)
2012-01-10 9:59 ` [PATCH 05/21] macb: " Florian Fainelli
@ 2012-01-10 9:59 ` Florian Fainelli
2012-01-10 9:59 ` [PATCH 07/21] fec: " Florian Fainelli
` (15 subsequent siblings)
21 siblings, 0 replies; 26+ messages in thread
From: Florian Fainelli @ 2012-01-10 9:59 UTC (permalink / raw)
To: netdev
Cc: Florian Fainelli, David S. Miller, Jeff Kirsher, Wan ZongShun,
Rick Jones, linux-kernel
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
drivers/net/ethernet/dnet.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/dnet.c b/drivers/net/ethernet/dnet.c
index ce88c0f..925c9ba 100644
--- a/drivers/net/ethernet/dnet.c
+++ b/drivers/net/ethernet/dnet.c
@@ -325,7 +325,8 @@ static int dnet_mii_init(struct dnet *bp)
bp->mii_bus->write = &dnet_mdio_write;
bp->mii_bus->reset = &dnet_mdio_reset;
- snprintf(bp->mii_bus->id, MII_BUS_ID_SIZE, "%x", 0);
+ snprintf(bp->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x",
+ bp->pdev->name, bp->pdev->id);
bp->mii_bus->priv = bp;
--
1.7.5.4
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 07/21] fec: use an unique MDIO bus name.
2012-01-10 9:59 [PATCH 00/21] NET: use unique MDIO bus names Florian Fainelli
` (5 preceding siblings ...)
2012-01-10 9:59 ` [PATCH 06/21] dnet: " Florian Fainelli
@ 2012-01-10 9:59 ` Florian Fainelli
2012-01-10 9:59 ` [PATCH 08/21] lantiq_etop: " Florian Fainelli
` (14 subsequent siblings)
21 siblings, 0 replies; 26+ messages in thread
From: Florian Fainelli @ 2012-01-10 9:59 UTC (permalink / raw)
To: netdev
Cc: Florian Fainelli, David S. Miller, Shawn Guo, Lothar Waßmann,
Xiao Jiang, Stephen Hemminger, linux-kernel
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
drivers/net/ethernet/freescale/fec.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/freescale/fec.c b/drivers/net/ethernet/freescale/fec.c
index 20c2e3f..c6aa641 100644
--- a/drivers/net/ethernet/freescale/fec.c
+++ b/drivers/net/ethernet/freescale/fec.c
@@ -1077,7 +1077,8 @@ static int fec_enet_mii_init(struct platform_device *pdev)
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, "%x", fep->dev_id + 1);
+ snprintf(fep->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x",
+ pdev->name, fep->dev_id + 1);
fep->mii_bus->priv = fep;
fep->mii_bus->parent = &pdev->dev;
--
1.7.5.4
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 08/21] lantiq_etop: use an unique MDIO bus name.
2012-01-10 9:59 [PATCH 00/21] NET: use unique MDIO bus names Florian Fainelli
` (6 preceding siblings ...)
2012-01-10 9:59 ` [PATCH 07/21] fec: " Florian Fainelli
@ 2012-01-10 9:59 ` Florian Fainelli
2012-01-10 9:59 ` [PATCH 09/21] mv643xx-eth: " Florian Fainelli
` (13 subsequent siblings)
21 siblings, 0 replies; 26+ messages in thread
From: Florian Fainelli @ 2012-01-10 9:59 UTC (permalink / raw)
To: netdev
Cc: Florian Fainelli, David S. Miller, John Crispin, Jeff Kirsher,
Jiri Pirko, linux-kernel
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
drivers/net/ethernet/lantiq_etop.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/lantiq_etop.c b/drivers/net/ethernet/lantiq_etop.c
index 0b3567a..85e2c6c 100644
--- a/drivers/net/ethernet/lantiq_etop.c
+++ b/drivers/net/ethernet/lantiq_etop.c
@@ -98,6 +98,7 @@ struct ltq_etop_chan {
struct ltq_etop_priv {
struct net_device *netdev;
+ struct platform_device *pdev;
struct ltq_eth_data *pldata;
struct resource *res;
@@ -436,7 +437,8 @@ ltq_etop_mdio_init(struct net_device *dev)
priv->mii_bus->read = ltq_etop_mdio_rd;
priv->mii_bus->write = ltq_etop_mdio_wr;
priv->mii_bus->name = "ltq_mii";
- snprintf(priv->mii_bus->id, MII_BUS_ID_SIZE, "%x", 0);
+ snprintf(priv->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x",
+ priv->pdev->name, priv->pdev->id);
priv->mii_bus->irq = kmalloc(sizeof(int) * PHY_MAX_ADDR, GFP_KERNEL);
if (!priv->mii_bus->irq) {
err = -ENOMEM;
@@ -734,6 +736,7 @@ ltq_etop_probe(struct platform_device *pdev)
dev->ethtool_ops = <q_etop_ethtool_ops;
priv = netdev_priv(dev);
priv->res = res;
+ priv->pdev = pdev;
priv->pldata = dev_get_platdata(&pdev->dev);
priv->netdev = dev;
spin_lock_init(&priv->lock);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 09/21] mv643xx-eth: use an unique MDIO bus name.
2012-01-10 9:59 [PATCH 00/21] NET: use unique MDIO bus names Florian Fainelli
` (7 preceding siblings ...)
2012-01-10 9:59 ` [PATCH 08/21] lantiq_etop: " Florian Fainelli
@ 2012-01-10 9:59 ` Florian Fainelli
2012-01-10 10:02 ` Lennert Buytenhek
2012-01-10 9:59 ` [PATCH 10/21] pxa168-eth: " Florian Fainelli
` (12 subsequent siblings)
21 siblings, 1 reply; 26+ messages in thread
From: Florian Fainelli @ 2012-01-10 9:59 UTC (permalink / raw)
To: netdev; +Cc: Florian Fainelli, Lennert Buytenhek, linux-kernel
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
drivers/net/ethernet/marvell/mv643xx_eth.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/marvell/mv643xx_eth.c b/drivers/net/ethernet/marvell/mv643xx_eth.c
index e87847e..f14122c 100644
--- a/drivers/net/ethernet/marvell/mv643xx_eth.c
+++ b/drivers/net/ethernet/marvell/mv643xx_eth.c
@@ -2612,7 +2612,8 @@ static int mv643xx_eth_shared_probe(struct platform_device *pdev)
msp->smi_bus->name = "mv643xx_eth smi";
msp->smi_bus->read = smi_bus_read;
msp->smi_bus->write = smi_bus_write,
- snprintf(msp->smi_bus->id, MII_BUS_ID_SIZE, "%d", pdev->id);
+ snprintf(msp->smi_bus->id, MII_BUS_ID_SIZE, "%s-%d",
+ pdev->name, pdev->id);
msp->smi_bus->parent = &pdev->dev;
msp->smi_bus->phy_mask = 0xffffffff;
if (mdiobus_register(msp->smi_bus) < 0)
--
1.7.5.4
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 10/21] pxa168-eth: use an unique MDIO bus name.
2012-01-10 9:59 [PATCH 00/21] NET: use unique MDIO bus names Florian Fainelli
` (8 preceding siblings ...)
2012-01-10 9:59 ` [PATCH 09/21] mv643xx-eth: " Florian Fainelli
@ 2012-01-10 9:59 ` Florian Fainelli
2012-01-10 9:59 ` [PATCH 11/21] sh-eth: " Florian Fainelli
` (11 subsequent siblings)
21 siblings, 0 replies; 26+ messages in thread
From: Florian Fainelli @ 2012-01-10 9:59 UTC (permalink / raw)
To: netdev
Cc: Florian Fainelli, David S. Miller, Jeff Kirsher, Wan ZongShun,
Axel Lin, linux-kernel
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
drivers/net/ethernet/marvell/pxa168_eth.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/marvell/pxa168_eth.c b/drivers/net/ethernet/marvell/pxa168_eth.c
index 5ec409e..953ba58 100644
--- a/drivers/net/ethernet/marvell/pxa168_eth.c
+++ b/drivers/net/ethernet/marvell/pxa168_eth.c
@@ -1552,7 +1552,8 @@ static int pxa168_eth_probe(struct platform_device *pdev)
pep->smi_bus->name = "pxa168_eth smi";
pep->smi_bus->read = pxa168_smi_read;
pep->smi_bus->write = pxa168_smi_write;
- snprintf(pep->smi_bus->id, MII_BUS_ID_SIZE, "%d", pdev->id);
+ snprintf(pep->smi_bus->id, MII_BUS_ID_SIZE, "%s-%d",
+ pdev->name, pdev->id);
pep->smi_bus->parent = &pdev->dev;
pep->smi_bus->phy_mask = 0xffffffff;
err = mdiobus_register(pep->smi_bus);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 11/21] sh-eth: use an unique MDIO bus name.
2012-01-10 9:59 [PATCH 00/21] NET: use unique MDIO bus names Florian Fainelli
` (9 preceding siblings ...)
2012-01-10 9:59 ` [PATCH 10/21] pxa168-eth: " Florian Fainelli
@ 2012-01-10 9:59 ` Florian Fainelli
2012-01-10 9:59 ` [PATCH 12/21] s6gmac: " Florian Fainelli
` (10 subsequent siblings)
21 siblings, 0 replies; 26+ messages in thread
From: Florian Fainelli @ 2012-01-10 9:59 UTC (permalink / raw)
To: netdev
Cc: Florian Fainelli, David S. Miller, Yoshihiro Shimoda,
Stephen Hemminger, Wan ZongShun, Jeff Kirsher, linux-kernel
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
drivers/net/ethernet/renesas/sh_eth.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
index fc9bda9..6ece429 100644
--- a/drivers/net/ethernet/renesas/sh_eth.c
+++ b/drivers/net/ethernet/renesas/sh_eth.c
@@ -1702,7 +1702,8 @@ static int sh_mdio_init(struct net_device *ndev, int id,
/* Hook up MII support for ethtool */
mdp->mii_bus->name = "sh_mii";
mdp->mii_bus->parent = &ndev->dev;
- snprintf(mdp->mii_bus->id, MII_BUS_ID_SIZE, "%x", id);
+ snprintf(mdp->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x",
+ mdp->pdev->name, pdid);
/* PHY IRQ */
mdp->mii_bus->irq = kmalloc(sizeof(int)*PHY_MAX_ADDR, GFP_KERNEL);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 12/21] s6gmac: use an unique MDIO bus name.
2012-01-10 9:59 [PATCH 00/21] NET: use unique MDIO bus names Florian Fainelli
` (10 preceding siblings ...)
2012-01-10 9:59 ` [PATCH 11/21] sh-eth: " Florian Fainelli
@ 2012-01-10 9:59 ` Florian Fainelli
2012-01-10 9:59 ` [PATCH 13/21] smsc911x: " Florian Fainelli
` (9 subsequent siblings)
21 siblings, 0 replies; 26+ messages in thread
From: Florian Fainelli @ 2012-01-10 9:59 UTC (permalink / raw)
To: netdev; +Cc: Florian Fainelli, Jeff Kirsher, linux-kernel
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
drivers/net/ethernet/s6gmac.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/s6gmac.c b/drivers/net/ethernet/s6gmac.c
index a7ff8ea..22e9c01 100644
--- a/drivers/net/ethernet/s6gmac.c
+++ b/drivers/net/ethernet/s6gmac.c
@@ -1004,7 +1004,7 @@ static int __devinit s6gmac_probe(struct platform_device *pdev)
mb->write = s6mii_write;
mb->reset = s6mii_reset;
mb->priv = pd;
- snprintf(mb->id, MII_BUS_ID_SIZE, "0");
+ snprintf(mb->id, MII_BUS_ID_SIZE, "%s-%x", pdev->name, pdev->id);
mb->phy_mask = ~(1 << 0);
mb->irq = &pd->mii.irq[0];
for (i = 0; i < PHY_MAX_ADDR; i++) {
--
1.7.5.4
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 13/21] smsc911x: use an unique MDIO bus name.
2012-01-10 9:59 [PATCH 00/21] NET: use unique MDIO bus names Florian Fainelli
` (11 preceding siblings ...)
2012-01-10 9:59 ` [PATCH 12/21] s6gmac: " Florian Fainelli
@ 2012-01-10 9:59 ` Florian Fainelli
2012-01-10 9:59 ` [PATCH 14/21] stmmac: " Florian Fainelli
` (8 subsequent siblings)
21 siblings, 0 replies; 26+ messages in thread
From: Florian Fainelli @ 2012-01-10 9:59 UTC (permalink / raw)
To: netdev; +Cc: Florian Fainelli, Steve Glendinning, linux-kernel
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
drivers/net/ethernet/smsc/smsc911x.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/smsc/smsc911x.c b/drivers/net/ethernet/smsc/smsc911x.c
index 9d0b8ce..24d2df0 100644
--- a/drivers/net/ethernet/smsc/smsc911x.c
+++ b/drivers/net/ethernet/smsc/smsc911x.c
@@ -1044,7 +1044,8 @@ static int __devinit smsc911x_mii_init(struct platform_device *pdev,
}
pdata->mii_bus->name = SMSC_MDIONAME;
- snprintf(pdata->mii_bus->id, MII_BUS_ID_SIZE, "%x", pdev->id);
+ snprintf(pdata->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x",
+ pdev->name, pdev->id);
pdata->mii_bus->priv = pdata;
pdata->mii_bus->read = smsc911x_mii_read;
pdata->mii_bus->write = smsc911x_mii_write;
--
1.7.5.4
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 14/21] stmmac: use an unique MDIO bus name.
2012-01-10 9:59 [PATCH 00/21] NET: use unique MDIO bus names Florian Fainelli
` (12 preceding siblings ...)
2012-01-10 9:59 ` [PATCH 13/21] smsc911x: " Florian Fainelli
@ 2012-01-10 9:59 ` Florian Fainelli
2012-01-10 9:59 ` [PATCH 15/21] cpmac: " Florian Fainelli
` (7 subsequent siblings)
21 siblings, 0 replies; 26+ messages in thread
From: Florian Fainelli @ 2012-01-10 9:59 UTC (permalink / raw)
To: netdev; +Cc: Florian Fainelli, Giuseppe Cavallaro, linux-kernel
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +-
drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 3738b47..f884d67 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -307,7 +307,7 @@ static int stmmac_init_phy(struct net_device *dev)
priv->speed = 0;
priv->oldduplex = -1;
- snprintf(bus_id, MII_BUS_ID_SIZE, "%x", priv->plat->bus_id);
+ snprintf(bus_id, MII_BUS_ID_SIZE, "stmmac-%x", priv->plat->bus_id);
snprintf(phy_id, MII_BUS_ID_SIZE + 3, PHY_ID_FMT, bus_id,
priv->plat->phy_addr);
pr_debug("stmmac_init_phy: trying to attach to %s\n", phy_id);
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
index 51f4412..da4a104 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
@@ -158,7 +158,8 @@ int stmmac_mdio_register(struct net_device *ndev)
new_bus->read = &stmmac_mdio_read;
new_bus->write = &stmmac_mdio_write;
new_bus->reset = &stmmac_mdio_reset;
- snprintf(new_bus->id, MII_BUS_ID_SIZE, "%x", mdio_bus_data->bus_id);
+ snprintf(new_bus->id, MII_BUS_ID_SIZE, "%s-%x",
+ new_bus->name, mdio_bus_data->bus_id);
new_bus->priv = ndev;
new_bus->irq = irqlist;
new_bus->phy_mask = mdio_bus_data->phy_mask;
--
1.7.5.4
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 15/21] cpmac: use an unique MDIO bus name.
2012-01-10 9:59 [PATCH 00/21] NET: use unique MDIO bus names Florian Fainelli
` (13 preceding siblings ...)
2012-01-10 9:59 ` [PATCH 14/21] stmmac: " Florian Fainelli
@ 2012-01-10 9:59 ` Florian Fainelli
2012-01-10 9:59 ` [PATCH 16/21] davinci_emac: " Florian Fainelli
` (6 subsequent siblings)
21 siblings, 0 replies; 26+ messages in thread
From: Florian Fainelli @ 2012-01-10 9:59 UTC (permalink / raw)
To: netdev; +Cc: Florian Fainelli, linux-kernel
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
drivers/net/ethernet/ti/cpmac.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/ti/cpmac.c b/drivers/net/ethernet/ti/cpmac.c
index aaac0c7..4d9a28f 100644
--- a/drivers/net/ethernet/ti/cpmac.c
+++ b/drivers/net/ethernet/ti/cpmac.c
@@ -1269,7 +1269,7 @@ int __devinit cpmac_init(void)
}
cpmac_mii->phy_mask = ~(mask | 0x80000000);
- snprintf(cpmac_mii->id, MII_BUS_ID_SIZE, "1");
+ snprintf(cpmac_mii->id, MII_BUS_ID_SIZE, "cpmac-1");
res = mdiobus_register(cpmac_mii);
if (res)
--
1.7.5.4
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 16/21] davinci_emac: use an unique MDIO bus name.
2012-01-10 9:59 [PATCH 00/21] NET: use unique MDIO bus names Florian Fainelli
` (14 preceding siblings ...)
2012-01-10 9:59 ` [PATCH 15/21] cpmac: " Florian Fainelli
@ 2012-01-10 9:59 ` Florian Fainelli
2012-01-10 9:59 ` [PATCH 17/21] ixp4xx-eth: " Florian Fainelli
` (5 subsequent siblings)
21 siblings, 0 replies; 26+ messages in thread
From: Florian Fainelli @ 2012-01-10 9:59 UTC (permalink / raw)
To: netdev; +Cc: Florian Fainelli, Jeff Kirsher, linux-kernel
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
drivers/net/ethernet/ti/davinci_mdio.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/ti/davinci_mdio.c b/drivers/net/ethernet/ti/davinci_mdio.c
index 7615040..ef7c9c1 100644
--- a/drivers/net/ethernet/ti/davinci_mdio.c
+++ b/drivers/net/ethernet/ti/davinci_mdio.c
@@ -313,7 +313,8 @@ static int __devinit davinci_mdio_probe(struct platform_device *pdev)
data->bus->reset = davinci_mdio_reset,
data->bus->parent = dev;
data->bus->priv = data;
- snprintf(data->bus->id, MII_BUS_ID_SIZE, "%x", pdev->id);
+ snprintf(data->bus->id, MII_BUS_ID_SIZE, "%s-%x",
+ pdev->name, pdev->id);
data->clk = clk_get(dev, NULL);
if (IS_ERR(data->clk)) {
--
1.7.5.4
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 17/21] ixp4xx-eth: use an unique MDIO bus name.
2012-01-10 9:59 [PATCH 00/21] NET: use unique MDIO bus names Florian Fainelli
` (15 preceding siblings ...)
2012-01-10 9:59 ` [PATCH 16/21] davinci_emac: " Florian Fainelli
@ 2012-01-10 9:59 ` Florian Fainelli
2012-01-10 9:59 ` [PATCH 18/21] bcm63xx_enet: " Florian Fainelli
` (4 subsequent siblings)
21 siblings, 0 replies; 26+ messages in thread
From: Florian Fainelli @ 2012-01-10 9:59 UTC (permalink / raw)
To: netdev; +Cc: Florian Fainelli, Krzysztof Halasa, linux-kernel
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
drivers/net/ethernet/xscale/ixp4xx_eth.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/xscale/ixp4xx_eth.c b/drivers/net/ethernet/xscale/ixp4xx_eth.c
index f45c85a..72a854f 100644
--- a/drivers/net/ethernet/xscale/ixp4xx_eth.c
+++ b/drivers/net/ethernet/xscale/ixp4xx_eth.c
@@ -529,7 +529,7 @@ static int ixp4xx_mdio_register(void)
mdio_bus->name = "IXP4xx MII Bus";
mdio_bus->read = &ixp4xx_mdio_read;
mdio_bus->write = &ixp4xx_mdio_write;
- strcpy(mdio_bus->id, "0");
+ snprintf(mdio_bus->id, MII_BUS_ID_SIZE, "ixp4xx-eth-0");
if ((err = mdiobus_register(mdio_bus)))
mdiobus_free(mdio_bus);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 18/21] bcm63xx_enet: use an unique MDIO bus name.
2012-01-10 9:59 [PATCH 00/21] NET: use unique MDIO bus names Florian Fainelli
` (16 preceding siblings ...)
2012-01-10 9:59 ` [PATCH 17/21] ixp4xx-eth: " Florian Fainelli
@ 2012-01-10 9:59 ` Florian Fainelli
2012-01-10 9:59 ` [PATCH 19/21] phy/fixed: " Florian Fainelli
` (3 subsequent siblings)
21 siblings, 0 replies; 26+ messages in thread
From: Florian Fainelli @ 2012-01-10 9:59 UTC (permalink / raw)
To: netdev
Cc: Florian Fainelli, David S. Miller, Jeff Kirsher, Jiri Pirko,
Rick Jones, linux-kernel
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
drivers/net/ethernet/broadcom/bcm63xx_enet.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/broadcom/bcm63xx_enet.c b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
index a11a8ad..0e871b0 100644
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
@@ -1727,7 +1727,7 @@ static int __devinit bcm_enet_probe(struct platform_device *pdev)
bus->priv = priv;
bus->read = bcm_enet_mdio_read_phylib;
bus->write = bcm_enet_mdio_write_phylib;
- sprintf(bus->id, "%d", priv->mac_id);
+ sprintf(bus->id, "%s-%d", pdev->name, priv->mac_id);
/* only probe bus where we think the PHY is, because
* the mdio read operation return 0 instead of 0xffff
--
1.7.5.4
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 19/21] phy/fixed: use an unique MDIO bus name.
2012-01-10 9:59 [PATCH 00/21] NET: use unique MDIO bus names Florian Fainelli
` (17 preceding siblings ...)
2012-01-10 9:59 ` [PATCH 18/21] bcm63xx_enet: " Florian Fainelli
@ 2012-01-10 9:59 ` Florian Fainelli
2012-01-10 9:59 ` [PATCH 20/21] mdio-gpio: " Florian Fainelli
` (2 subsequent siblings)
21 siblings, 0 replies; 26+ messages in thread
From: Florian Fainelli @ 2012-01-10 9:59 UTC (permalink / raw)
To: netdev; +Cc: Florian Fainelli, linux-kernel
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
drivers/net/phy/fixed.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/phy/fixed.c b/drivers/net/phy/fixed.c
index 1fa4d73..633680d 100644
--- a/drivers/net/phy/fixed.c
+++ b/drivers/net/phy/fixed.c
@@ -220,7 +220,7 @@ static int __init fixed_mdio_bus_init(void)
goto err_mdiobus_reg;
}
- snprintf(fmb->mii_bus->id, MII_BUS_ID_SIZE, "0");
+ snprintf(fmb->mii_bus->id, MII_BUS_ID_SIZE, "fixed-0");
fmb->mii_bus->name = "Fixed MDIO Bus";
fmb->mii_bus->priv = fmb;
fmb->mii_bus->parent = &pdev->dev;
--
1.7.5.4
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 20/21] mdio-gpio: use an unique MDIO bus name.
2012-01-10 9:59 [PATCH 00/21] NET: use unique MDIO bus names Florian Fainelli
` (18 preceding siblings ...)
2012-01-10 9:59 ` [PATCH 19/21] phy/fixed: " Florian Fainelli
@ 2012-01-10 9:59 ` Florian Fainelli
2012-01-10 9:59 ` [PATCH 21/21] mdio-octeon: " Florian Fainelli
2012-01-11 0:35 ` [PATCH 00/21] NET: use unique MDIO bus names David Miller
21 siblings, 0 replies; 26+ messages in thread
From: Florian Fainelli @ 2012-01-10 9:59 UTC (permalink / raw)
To: netdev
Cc: Florian Fainelli, David S. Miller, Grant Likely,
Srinivas Kandagatla, Dirk Eibach, linux-kernel
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
drivers/net/phy/mdio-gpio.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/phy/mdio-gpio.c b/drivers/net/phy/mdio-gpio.c
index 89c5a3e..50e8e5e 100644
--- a/drivers/net/phy/mdio-gpio.c
+++ b/drivers/net/phy/mdio-gpio.c
@@ -116,7 +116,7 @@ static struct mii_bus * __devinit mdio_gpio_bus_init(struct device *dev,
if (!new_bus->irq[i])
new_bus->irq[i] = PHY_POLL;
- snprintf(new_bus->id, MII_BUS_ID_SIZE, "%x", bus_id);
+ snprintf(new_bus->id, MII_BUS_ID_SIZE, "gpio-%x", bus_id);
if (gpio_request(bitbang->mdc, "mdc"))
goto out_free_bus;
--
1.7.5.4
^ permalink raw reply related [flat|nested] 26+ messages in thread
* [PATCH 21/21] mdio-octeon: use an unique MDIO bus name.
2012-01-10 9:59 [PATCH 00/21] NET: use unique MDIO bus names Florian Fainelli
` (19 preceding siblings ...)
2012-01-10 9:59 ` [PATCH 20/21] mdio-gpio: " Florian Fainelli
@ 2012-01-10 9:59 ` Florian Fainelli
2012-01-11 0:35 ` [PATCH 00/21] NET: use unique MDIO bus names David Miller
21 siblings, 0 replies; 26+ messages in thread
From: Florian Fainelli @ 2012-01-10 9:59 UTC (permalink / raw)
To: netdev; +Cc: Florian Fainelli, linux-kernel
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
drivers/net/phy/mdio-octeon.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/phy/mdio-octeon.c b/drivers/net/phy/mdio-octeon.c
index bd12ba9..826d961 100644
--- a/drivers/net/phy/mdio-octeon.c
+++ b/drivers/net/phy/mdio-octeon.c
@@ -118,7 +118,8 @@ static int __devinit octeon_mdiobus_probe(struct platform_device *pdev)
bus->mii_bus->priv = bus;
bus->mii_bus->irq = bus->phy_irq;
bus->mii_bus->name = "mdio-octeon";
- snprintf(bus->mii_bus->id, MII_BUS_ID_SIZE, "%x", bus->unit);
+ snprintf(bus->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x",
+ bus->mii_bus->name, bus->unit);
bus->mii_bus->parent = &pdev->dev;
bus->mii_bus->read = octeon_mdiobus_read;
--
1.7.5.4
^ permalink raw reply related [flat|nested] 26+ messages in thread
* Re: [PATCH 05/21] macb: use an unique MDIO bus name.
2012-01-10 9:59 ` [PATCH 05/21] macb: " Florian Fainelli
@ 2012-01-10 10:01 ` Nicolas Ferre
0 siblings, 0 replies; 26+ messages in thread
From: Nicolas Ferre @ 2012-01-10 10:01 UTC (permalink / raw)
To: Florian Fainelli; +Cc: netdev, linux-kernel
On 01/10/2012 10:59 AM, Florian Fainelli :
> Signed-off-by: Florian Fainelli <florian@openwrt.org>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Thanks Florian,
> ---
> drivers/net/ethernet/cadence/macb.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c
> index a437b46..49508b7 100644
> --- a/drivers/net/ethernet/cadence/macb.c
> +++ b/drivers/net/ethernet/cadence/macb.c
> @@ -244,7 +244,8 @@ static int macb_mii_init(struct macb *bp)
> 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, "%x", bp->pdev->id);
> + snprintf(bp->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x",
> + bp->pdev->name, bp->pdev->id);
> bp->mii_bus->priv = bp;
> bp->mii_bus->parent = &bp->dev->dev;
> pdata = bp->pdev->dev.platform_data;
Best regards,
--
Nicolas Ferre
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 09/21] mv643xx-eth: use an unique MDIO bus name.
2012-01-10 9:59 ` [PATCH 09/21] mv643xx-eth: " Florian Fainelli
@ 2012-01-10 10:02 ` Lennert Buytenhek
0 siblings, 0 replies; 26+ messages in thread
From: Lennert Buytenhek @ 2012-01-10 10:02 UTC (permalink / raw)
To: Florian Fainelli; +Cc: netdev, linux-kernel
On Tue, Jan 10, 2012 at 10:59:15AM +0100, Florian Fainelli wrote:
> Signed-off-by: Florian Fainelli <florian@openwrt.org>
Acked-by: Lennert Buytenhek <buytenh@wantstofly.org>
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 00/21] NET: use unique MDIO bus names
2012-01-10 9:59 [PATCH 00/21] NET: use unique MDIO bus names Florian Fainelli
` (20 preceding siblings ...)
2012-01-10 9:59 ` [PATCH 21/21] mdio-octeon: " Florian Fainelli
@ 2012-01-11 0:35 ` David Miller
21 siblings, 0 replies; 26+ messages in thread
From: David Miller @ 2012-01-11 0:35 UTC (permalink / raw)
To: florian; +Cc: netdev
From: Florian Fainelli <florian@openwrt.org>
Date: Tue, 10 Jan 2012 10:59:06 +0100
> While troubleshooting an issue with an user of the RDC r6040 driver
> having compiled support for the fixed MDIO bus, I noticed that quite
> some network drivers will have a MDIO bus named "0" most of the time.
>
> Some network drivers already try to provide an unique MDIO bus name
> using their PCI slot and function, this is okay.
>
> Some other network drivers will format the name using their platform_device
> id, which will usually result in a collision with the fixed MDIO bus
> name ("0"), these drivers are fixed to use the following pattern instead:
>
> <platform_device name>-<platform device id> which is unique
>
> Finally the MDIO bus drivers themselves are patched to use an unique name
> as well.
>
> There is a potential to break user-space applications assuming there is a
> specific MDIO bus named "0", "1" or other non-explanatory names like this.
>
> Note that I compile tested most of the drivers on x86 and MIPS, ARM and Blackfin
> drivers have not been compile tested.
All applied, thanks Florian.
^ permalink raw reply [flat|nested] 26+ messages in thread
* Re: [PATCH 02/21] bfin_mac: use an unique MDIO bus name.
2012-01-10 9:59 ` [PATCH 02/21] bfin_mac: " Florian Fainelli
@ 2012-01-11 14:47 ` Bob Liu
0 siblings, 0 replies; 26+ messages in thread
From: Bob Liu @ 2012-01-11 14:47 UTC (permalink / raw)
To: Florian Fainelli
Cc: netdev, David S. Miller, Jeff Kirsher, Jiri Pirko, Bob Liu,
uclinux-dist-devel, linux-kernel
On Tue, Jan 10, 2012 at 5:59 PM, Florian Fainelli <florian@openwrt.org> wrote:
> Signed-off-by: Florian Fainelli <florian@openwrt.org>
> ---
> drivers/net/ethernet/adi/bfin_mac.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/ethernet/adi/bfin_mac.c b/drivers/net/ethernet/adi/bfin_mac.c
> index b6d69c9..d812a10 100644
> --- a/drivers/net/ethernet/adi/bfin_mac.c
> +++ b/drivers/net/ethernet/adi/bfin_mac.c
> @@ -1670,7 +1670,8 @@ static int __devinit bfin_mii_bus_probe(struct platform_device *pdev)
> miibus->name = "bfin_mii_bus";
> miibus->phy_mask = mii_bus_pd->phy_mask;
>
> - snprintf(miibus->id, MII_BUS_ID_SIZE, "0");
> + snprintf(miibus->id, MII_BUS_ID_SIZE, "%s-%x",
> + pdev->name, pdev->id);
> miibus->irq = kmalloc(sizeof(int)*PHY_MAX_ADDR, GFP_KERNEL);
> if (!miibus->irq)
> goto out_err_irq_alloc;
> --
> 1.7.5.4
Looks fine for me. Thanks.
Acked-by: Bob Liu <lliubbo@gmail.com>
--
Regards,
--Bob
^ permalink raw reply [flat|nested] 26+ messages in thread
end of thread, other threads:[~2012-01-11 14:47 UTC | newest]
Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-10 9:59 [PATCH 00/21] NET: use unique MDIO bus names Florian Fainelli
2012-01-10 9:59 ` [PATCH 01/21] ax88796: use an unique MDIO bus name Florian Fainelli
2012-01-10 9:59 ` [PATCH 02/21] bfin_mac: " Florian Fainelli
2012-01-11 14:47 ` Bob Liu
2012-01-10 9:59 ` [PATCH 03/21] au1000-eth: " Florian Fainelli
2012-01-10 9:59 ` [PATCH 04/21] sb1250: " Florian Fainelli
2012-01-10 9:59 ` [PATCH 05/21] macb: " Florian Fainelli
2012-01-10 10:01 ` Nicolas Ferre
2012-01-10 9:59 ` [PATCH 06/21] dnet: " Florian Fainelli
2012-01-10 9:59 ` [PATCH 07/21] fec: " Florian Fainelli
2012-01-10 9:59 ` [PATCH 08/21] lantiq_etop: " Florian Fainelli
2012-01-10 9:59 ` [PATCH 09/21] mv643xx-eth: " Florian Fainelli
2012-01-10 10:02 ` Lennert Buytenhek
2012-01-10 9:59 ` [PATCH 10/21] pxa168-eth: " Florian Fainelli
2012-01-10 9:59 ` [PATCH 11/21] sh-eth: " Florian Fainelli
2012-01-10 9:59 ` [PATCH 12/21] s6gmac: " Florian Fainelli
2012-01-10 9:59 ` [PATCH 13/21] smsc911x: " Florian Fainelli
2012-01-10 9:59 ` [PATCH 14/21] stmmac: " Florian Fainelli
2012-01-10 9:59 ` [PATCH 15/21] cpmac: " Florian Fainelli
2012-01-10 9:59 ` [PATCH 16/21] davinci_emac: " Florian Fainelli
2012-01-10 9:59 ` [PATCH 17/21] ixp4xx-eth: " Florian Fainelli
2012-01-10 9:59 ` [PATCH 18/21] bcm63xx_enet: " Florian Fainelli
2012-01-10 9:59 ` [PATCH 19/21] phy/fixed: " Florian Fainelli
2012-01-10 9:59 ` [PATCH 20/21] mdio-gpio: " Florian Fainelli
2012-01-10 9:59 ` [PATCH 21/21] mdio-octeon: " Florian Fainelli
2012-01-11 0:35 ` [PATCH 00/21] NET: use unique MDIO bus names 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).