Skip to content

Commit

Permalink
net: dsa: slave: Fix autoneg for phys on switch MDIO bus
Browse files Browse the repository at this point in the history
When the ports phys are connected to the switches internal MDIO bus,
we need to connect the phy to the slave netdev, otherwise
auto-negotiation etc, does not work.

Signed-off-by: Andrew Lunn <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
lunn authored and davem330 committed Nov 6, 2014
1 parent 5816c3d commit b31f65f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions net/dsa/slave.c
Original file line number Diff line number Diff line change
Expand Up @@ -489,11 +489,14 @@ static void dsa_slave_phy_setup(struct dsa_slave_priv *p,
/* We could not connect to a designated PHY, so use the switch internal
* MDIO bus instead
*/
if (!p->phy)
if (!p->phy) {
p->phy = ds->slave_mii_bus->phy_map[p->port];
else
phy_connect_direct(slave_dev, p->phy, dsa_slave_adjust_link,
p->phy_interface);
} else {
pr_info("attached PHY at address %d [%s]\n",
p->phy->addr, p->phy->drv->name);
}
}

int dsa_slave_suspend(struct net_device *slave_dev)
Expand Down

0 comments on commit b31f65f

Please sign in to comment.