From: Andrew Lunn Date: Wed, 5 Nov 2014 18:47:28 +0000 (+0100) Subject: net: dsa: slave: Fix autoneg for phys on switch MDIO bus X-Git-Tag: v4.9.8~5358^2~28 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b31f65fb4383a49bdcfa465176754b37e44e1e17;p=platform%2Fkernel%2Flinux-rpi3.git net: dsa: slave: Fix autoneg for phys on switch MDIO bus 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 Signed-off-by: David S. Miller --- diff --git a/net/dsa/slave.c b/net/dsa/slave.c index 6d18174..ab03e00 100644 --- a/net/dsa/slave.c +++ b/net/dsa/slave.c @@ -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)