* [PATCH 1/5] cpmac: fix PHY name to match MDIO bus name
2012-02-13 11:23 [PATCH 0/5] NET: PHY names vs MDIO bus names regression fixes Florian Fainelli
@ 2012-02-13 11:23 ` Florian Fainelli
2012-02-13 11:23 ` [PATCH 2/5] bcm63xx-enet: " Florian Fainelli
` (4 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Florian Fainelli @ 2012-02-13 11:23 UTC (permalink / raw)
To: davem; +Cc: netdev, Florian Fainelli, stable
Commit d1733f07: cpmac: use an unique MDIO bus name changed the MDIO bus
name from "1" to "cpmac-1", this breaks the PHY connection logic because
the PHY name still uses the old bus names "0" and "1", fix that to
always use the mdio bus id instead.
CC: stable@vger.kernel.org
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
drivers/net/ethernet/ti/cpmac.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/ti/cpmac.c b/drivers/net/ethernet/ti/cpmac.c
index 97e1df3..860c252 100644
--- a/drivers/net/ethernet/ti/cpmac.c
+++ b/drivers/net/ethernet/ti/cpmac.c
@@ -1122,7 +1122,7 @@ static int __devinit cpmac_probe(struct platform_device *pdev)
pdata = pdev->dev.platform_data;
if (external_switch || dumb_switch) {
- strncpy(mdio_bus_id, "0", MII_BUS_ID_SIZE); /* fixed phys bus */
+ strncpy(mdio_bus_id, "fixed-0", MII_BUS_ID_SIZE); /* fixed phys bus */
phy_id = pdev->id;
} else {
for (phy_id = 0; phy_id < PHY_MAX_ADDR; phy_id++) {
@@ -1138,7 +1138,7 @@ static int __devinit cpmac_probe(struct platform_device *pdev)
if (phy_id == PHY_MAX_ADDR) {
dev_err(&pdev->dev, "no PHY present, falling back "
"to switch on MDIO bus 0\n");
- strncpy(mdio_bus_id, "0", MII_BUS_ID_SIZE); /* fixed phys bus */
+ strncpy(mdio_bus_id, "fixed-0", MII_BUS_ID_SIZE); /* fixed phys bus */
phy_id = pdev->id;
}
--
1.7.5.4
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH 2/5] bcm63xx-enet: fix PHY name to match MDIO bus name
2012-02-13 11:23 [PATCH 0/5] NET: PHY names vs MDIO bus names regression fixes Florian Fainelli
2012-02-13 11:23 ` [PATCH 1/5] cpmac: fix PHY name to match MDIO bus name Florian Fainelli
@ 2012-02-13 11:23 ` Florian Fainelli
2012-02-13 11:23 ` [PATCH 3/5] fec: fix PHY name to match fixed " Florian Fainelli
` (3 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Florian Fainelli @ 2012-02-13 11:23 UTC (permalink / raw)
To: davem; +Cc: netdev, Florian Fainelli, stable
Commit 3e617506: bcm63xx_enet: use an unique MDIO bus name introduced
a regression in the PHY connection logic, since the PHY name was formatted
to expect the bus name to be "0" or "1", whereas it is now "bcm63xx-enet-0"
or "bcm63xx-enet-1".
CC: stable@vger.kernel.org
Reported-by: Joel EJC <joel_ejc@yahoofr>
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 986019b..c7ca7ec 100644
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
@@ -797,7 +797,7 @@ static int bcm_enet_open(struct net_device *dev)
if (priv->has_phy) {
/* connect to PHY */
snprintf(phy_id, sizeof(phy_id), PHY_ID_FMT,
- priv->mac_id ? "1" : "0", priv->phy_id);
+ priv->mii_bus->id, priv->phy_id);
phydev = phy_connect(dev, phy_id, bcm_enet_adjust_phy_link, 0,
PHY_INTERFACE_MODE_MII);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH 3/5] fec: fix PHY name to match fixed MDIO bus name
2012-02-13 11:23 [PATCH 0/5] NET: PHY names vs MDIO bus names regression fixes Florian Fainelli
2012-02-13 11:23 ` [PATCH 1/5] cpmac: fix PHY name to match MDIO bus name Florian Fainelli
2012-02-13 11:23 ` [PATCH 2/5] bcm63xx-enet: " Florian Fainelli
@ 2012-02-13 11:23 ` Florian Fainelli
2012-02-13 11:23 ` [PATCH 4/5] octeon: fix PHY name to match " Florian Fainelli
` (2 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Florian Fainelli @ 2012-02-13 11:23 UTC (permalink / raw)
To: davem; +Cc: netdev, Florian Fainelli, stable
Commit "391420f7: fec: use an unique MDIO bus name" first modified
the MDIO bus name to include the platform name, then in commit
"a7ed07d5: net: fec: correct phy_name buffer length when init phy_name"
the PHY name formatting was fixed in the case the PHY matches a PHY
driver.
The FEC driver however, also handles the case where we want to attach
to the fixed MDIO bus name, which was previously named "0", and now
"fixed-0". Change the PHY formatting logic to account for that.
CC: stable@vger.kernel.org
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
drivers/net/ethernet/freescale/fec.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/freescale/fec.c b/drivers/net/ethernet/freescale/fec.c
index 0ee2ca7..a12b3f5 100644
--- a/drivers/net/ethernet/freescale/fec.c
+++ b/drivers/net/ethernet/freescale/fec.c
@@ -986,7 +986,7 @@ static int fec_enet_mii_probe(struct net_device *ndev)
printk(KERN_INFO
"%s: no PHY, assuming direct connection to switch\n",
ndev->name);
- strncpy(mdio_bus_id, "0", MII_BUS_ID_SIZE);
+ strncpy(mdio_bus_id, "fixed-0", MII_BUS_ID_SIZE);
phy_id = 0;
}
--
1.7.5.4
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH 4/5] octeon: fix PHY name to match MDIO bus name
2012-02-13 11:23 [PATCH 0/5] NET: PHY names vs MDIO bus names regression fixes Florian Fainelli
` (2 preceding siblings ...)
2012-02-13 11:23 ` [PATCH 3/5] fec: fix PHY name to match fixed " Florian Fainelli
@ 2012-02-13 11:23 ` Florian Fainelli
2012-02-13 11:23 ` [PATCH 5/5] ixp4xx-eth: " Florian Fainelli
2012-02-13 21:02 ` [PATCH 0/5] NET: PHY names vs MDIO bus names regression fixes David Miller
5 siblings, 0 replies; 9+ messages in thread
From: Florian Fainelli @ 2012-02-13 11:23 UTC (permalink / raw)
To: davem; +Cc: netdev, Florian Fainelli, stable
Commit "d6c25be: mdio-octeon: use an unique MDIO bus name" changed the
octeon MDIO bus name from "0" to "mdio-octeon-0", change the PHY
formatting logic to account for that name change, so that PHY connection
on this bus succeeds.
CC: stable@vger.kernel.org
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
drivers/net/ethernet/octeon/octeon_mgmt.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/octeon/octeon_mgmt.c b/drivers/net/ethernet/octeon/octeon_mgmt.c
index 212f43b..cd827ff 100644
--- a/drivers/net/ethernet/octeon/octeon_mgmt.c
+++ b/drivers/net/ethernet/octeon/octeon_mgmt.c
@@ -670,7 +670,7 @@ static void octeon_mgmt_adjust_link(struct net_device *netdev)
static int octeon_mgmt_init_phy(struct net_device *netdev)
{
struct octeon_mgmt *p = netdev_priv(netdev);
- char phy_id[20];
+ char phy_id[MII_BUS_ID_SIZE + 3];
if (octeon_is_simulation()) {
/* No PHYs in the simulator. */
@@ -678,7 +678,7 @@ static int octeon_mgmt_init_phy(struct net_device *netdev)
return 0;
}
- snprintf(phy_id, sizeof(phy_id), PHY_ID_FMT, "0", p->port);
+ snprintf(phy_id, sizeof(phy_id), PHY_ID_FMT, "mdio-octeon-0", p->port);
p->phydev = phy_connect(netdev, phy_id, octeon_mgmt_adjust_link, 0,
PHY_INTERFACE_MODE_MII);
--
1.7.5.4
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH 5/5] ixp4xx-eth: fix PHY name to match MDIO bus name
2012-02-13 11:23 [PATCH 0/5] NET: PHY names vs MDIO bus names regression fixes Florian Fainelli
` (3 preceding siblings ...)
2012-02-13 11:23 ` [PATCH 4/5] octeon: fix PHY name to match " Florian Fainelli
@ 2012-02-13 11:23 ` Florian Fainelli
2012-02-13 21:02 ` [PATCH 0/5] NET: PHY names vs MDIO bus names regression fixes David Miller
5 siblings, 0 replies; 9+ messages in thread
From: Florian Fainelli @ 2012-02-13 11:23 UTC (permalink / raw)
To: davem; +Cc: netdev, Florian Fainelli, stable
Commit 0869b3a4: ixp4xx-eth: use an unique MDIO bus name changed
the MDIO bus name from "0" to "ixp4xx-eth-0", as a result the PHY
name is not longer appropriate and will not match the MDIO bus name
so PHY connection will not succeed, fix that.
CC: stable@vger.kernel.org
Signed-off-by: Florian Fainelli <florian@openwrt.org>
---
drivers/net/ethernet/xscale/ixp4xx_eth.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/net/ethernet/xscale/ixp4xx_eth.c b/drivers/net/ethernet/xscale/ixp4xx_eth.c
index 72a854f..41a8b5a 100644
--- a/drivers/net/ethernet/xscale/ixp4xx_eth.c
+++ b/drivers/net/ethernet/xscale/ixp4xx_eth.c
@@ -1416,7 +1416,8 @@ static int __devinit eth_init_one(struct platform_device *pdev)
__raw_writel(DEFAULT_CORE_CNTRL, &port->regs->core_control);
udelay(50);
- snprintf(phy_id, MII_BUS_ID_SIZE + 3, PHY_ID_FMT, "0", plat->phy);
+ snprintf(phy_id, MII_BUS_ID_SIZE + 3, PHY_ID_FMT,
+ mdio_bus->id, plat->phy);
port->phydev = phy_connect(dev, phy_id, &ixp4xx_adjust_link, 0,
PHY_INTERFACE_MODE_MII);
if (IS_ERR(port->phydev)) {
--
1.7.5.4
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH 0/5] NET: PHY names vs MDIO bus names regression fixes
2012-02-13 11:23 [PATCH 0/5] NET: PHY names vs MDIO bus names regression fixes Florian Fainelli
` (4 preceding siblings ...)
2012-02-13 11:23 ` [PATCH 5/5] ixp4xx-eth: " Florian Fainelli
@ 2012-02-13 21:02 ` David Miller
2012-02-13 22:00 ` Florian Fainelli
5 siblings, 1 reply; 9+ messages in thread
From: David Miller @ 2012-02-13 21:02 UTC (permalink / raw)
To: florian; +Cc: netdev
From: Florian Fainelli <florian@openwrt.org>
Date: Mon, 13 Feb 2012 12:23:19 +0100
> This patch serie aims at fixing the regressions introduced with the
> "use an unique MDIO bus name" patchset. Some drivers still formatted
> the PHY id to use the old bus name (e.g: "0" or "1") and therefore
> the PHY probing logic gets broken because their underlying MDIO bus
> name was changed too from "0" to <foo>-<id>.
>
> The offending patches got introduced during 3.3-rc1.
Then why the heck are you CC:'ing -stable on these patches?
We're still in the 3.3-rcX phase, so there is no other tree in
the world these patches should be applied to.
In any event, for networking stuff, you shouldn't be adding
the stable CC: anyways, I take care of all networking stable
submissions myself.
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH 0/5] NET: PHY names vs MDIO bus names regression fixes
2012-02-13 21:02 ` [PATCH 0/5] NET: PHY names vs MDIO bus names regression fixes David Miller
@ 2012-02-13 22:00 ` Florian Fainelli
2012-02-13 23:43 ` David Miller
0 siblings, 1 reply; 9+ messages in thread
From: Florian Fainelli @ 2012-02-13 22:00 UTC (permalink / raw)
To: David Miller; +Cc: netdev
Le lundi 13 février 2012 22:02:04, David Miller a écrit :
> From: Florian Fainelli <florian@openwrt.org>
> Date: Mon, 13 Feb 2012 12:23:19 +0100
>
> > This patch serie aims at fixing the regressions introduced with the
> > "use an unique MDIO bus name" patchset. Some drivers still formatted
> > the PHY id to use the old bus name (e.g: "0" or "1") and therefore
> > the PHY probing logic gets broken because their underlying MDIO bus
> > name was changed too from "0" to <foo>-<id>.
> >
> > The offending patches got introduced during 3.3-rc1.
>
> Then why the heck are you CC:'ing -stable on these patches?
There was no reason, just some bad habit.
>
> We're still in the 3.3-rcX phase, so there is no other tree in
> the world these patches should be applied to.
>
> In any event, for networking stuff, you shouldn't be adding
> the stable CC: anyways, I take care of all networking stable
> submissions myself.
Allright, do you want me to resend these without the CC or are they okay as
is?
--
Florian
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 0/5] NET: PHY names vs MDIO bus names regression fixes
2012-02-13 22:00 ` Florian Fainelli
@ 2012-02-13 23:43 ` David Miller
0 siblings, 0 replies; 9+ messages in thread
From: David Miller @ 2012-02-13 23:43 UTC (permalink / raw)
To: florian; +Cc: netdev
From: Florian Fainelli <florian@openwrt.org>
Date: Mon, 13 Feb 2012 23:00:27 +0100
> Allright, do you want me to resend these without the CC or are they okay as
> is?
If you actually took a look at my tree you'd see all of your
changes there, and therefore you wouldn't have to waste time
asking silly questions like this.
^ permalink raw reply [flat|nested] 9+ messages in thread