Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b31f65fb authored by Andrew Lunn's avatar Andrew Lunn Committed by David S. Miller
Browse files

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: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5816c3da
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -489,12 +489,15 @@ 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)
{