Skip to content

Commit

Permalink
octeon: fix PHY name to match MDIO bus name
Browse files Browse the repository at this point in the history
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.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Florian Fainelli authored and David S. Miller committed Feb 13, 2012
1 parent ea51ade commit b0c06e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/octeon/octeon_mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -670,15 +670,15 @@ 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. */
netif_carrier_on(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);
Expand Down

0 comments on commit b0c06e1

Please sign in to comment.