Skip to contentSkip to conversation

staging/octeon: Fix PHY binding in octeon-ethernet driver.

PATCH In review David Daney 4 participants 4 messages Feb 23, 2012 – Mar 6, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging/octeon: Fix PHY binding in octeon-ethernet driver.

From: David Daney <[email protected]>

Commit d6c25be (mdio-octeon: use an unique MDIO bus name.) changed the names used to refer to MDIO buses. The ethernet driver must be changed to match, so that the PHY drivers can be attached.

Cc Florian Fainelli <[email protected]>
---
 drivers/staging/octeon/ethernet-mdio.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
drivers/staging/octeon/ethernet-mdio.c +2 -2
index 63800ba..e31949c 100644
@@ -164,9 +164,9 @@ int cvm_oct_phy_setup_device(struct net_device *dev)
 
 	int phy_addr = cvmx_helper_board_get_mii_address(priv->port);
 	if (phy_addr != -1) {
-		char phy_id[20];
+		char phy_id[MII_BUS_ID_SIZE + 3];
 
-		snprintf(phy_id, sizeof(phy_id), PHY_ID_FMT, "0", phy_addr);
+		snprintf(phy_id, sizeof(phy_id), PHY_ID_FMT, "mdio-octeon-0", phy_addr);
 
 		priv->phydev = phy_connect(dev, phy_id, cvm_oct_adjust_link, 0,
 					PHY_INTERFACE_MODE_GMII);
Signature · 1 line
1.7.2.3
Acked-by on v1 1/1
#1 lore raw
Quoted 8 lines · David Daney

From: David Daney<[email protected]>

Commit d6c25be (mdio-octeon: use an unique MDIO bus name.) changed the names used to refer to MDIO buses. The ethernet driver must be changed to match, so that the PHY drivers can be attached.

Cc Florian Fainelli<[email protected]>
Quoted 20 lines
---
  drivers/staging/octeon/ethernet-mdio.c |    4 ++--
  1 files changed, 2 insertions(+), 2 deletions(-)
drivers/staging/octeon/ethernet-mdio.c +2 -2
index 63800ba..e31949c 100644
@@ -164,9 +164,9 @@ int cvm_oct_phy_setup_device(struct net_device *dev)
 
  	int phy_addr = cvmx_helper_board_get_mii_address(priv->port);
  	if (phy_addr != -1) {
-		char phy_id[20];
+		char phy_id[MII_BUS_ID_SIZE + 3];
 
-		snprintf(phy_id, sizeof(phy_id), PHY_ID_FMT, "0", phy_addr);
+		snprintf(phy_id, sizeof(phy_id), PHY_ID_FMT, "mdio-octeon-0", phy_addr);
 
  		priv->phydev = phy_connect(dev, phy_id, cvm_oct_adjust_link, 0,
  					PHY_INTERFACE_MODE_GMII);
#2 lore raw
Quoted 10 lines · Florian Fainelli
Quoted 8 lines · David Daney

From: David Daney<[email protected]>

Commit d6c25be (mdio-octeon: use an unique MDIO bus name.) changed the names used to refer to MDIO buses. The ethernet driver must be changed to match, so that the PHY drivers can be attached.

Cc Florian Fainelli<[email protected]>

I would also add (and should have in the original post), that the commit causing the regression was merged for 3.3. So if possible, it would be nice to get this in before the final 3.3.

Thanks,
David Daney

Quoted 24 lines
Quoted 22 lines

---
drivers/staging/octeon/ethernet-mdio.c | 4 ++--

1 files changed, 2 insertions(+), 2 deletions(-)
drivers/staging/octeon/ethernet-mdio.c +2 -2
index 63800ba..e31949c 100644
@@ -164,9 +164,9 @@ int cvm_oct_phy_setup_device(struct net_device *dev)
 
 int phy_addr = cvmx_helper_board_get_mii_address(priv->port);
 if (phy_addr != -1) {
- char phy_id[20];
+ char phy_id[MII_BUS_ID_SIZE + 3];
 
- snprintf(phy_id, sizeof(phy_id), PHY_ID_FMT, "0", phy_addr);
+ snprintf(phy_id, sizeof(phy_id), PHY_ID_FMT, "mdio-octeon-0",
 phy_addr);
 
 priv->phydev = phy_connect(dev, phy_id, cvm_oct_adjust_link, 0,

PHY_INTERFACE_MODE_GMII);

#3 lore raw
In reply to David Daney
Quoted 7 lines · David Daney

Date: Thu, 23 Feb 2012 11:19:31 -0800
From: David Daney <[email protected]>
To: Greg Kroah-Hartman <[email protected]>
Cc: [email protected], [email protected], David Daney
<[email protected]>, Florian Fainelli <[email protected]>
Subject: [PATCH] staging/octeon: Fix PHY binding in octeon-ethernet driver.

Quoted 5 lines

From: David Daney <[email protected]>

Commit d6c25be (mdio-octeon: use an unique MDIO bus name.) changed the names used to refer to MDIO buses. The ethernet driver must be changed to match, so that the PHY drivers can be attached.

No objections heared, so applied.

Ralf