Commit ab017b79 authored by Russell King's avatar Russell King Committed by David S. Miller
Browse files

net: dsa/b53: use resolved link config in mac_link_up()



Convert the B53 driver to use the finalised link parameters in
mac_link_up() rather than the parameters in mac_config(). This is
just a matter of moving the call to b53_force_port_config().

Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3cad1c8b
Loading
Loading
Loading
Loading
+3 −9
Original line number Diff line number Diff line
@@ -1254,16 +1254,8 @@ void b53_phylink_mac_config(struct dsa_switch *ds, int port,
{
	struct b53_device *dev = ds->priv;

	if (mode == MLO_AN_PHY)
		return;

	if (mode == MLO_AN_FIXED) {
		b53_force_port_config(dev, port, state->speed,
				      state->duplex,
				      !!(state->pause & MLO_PAUSE_TX),
				      !!(state->pause & MLO_PAUSE_RX));
	if (mode == MLO_AN_PHY || mode == MLO_AN_FIXED)
		return;
	}

	if ((phy_interface_mode_is_8023z(state->interface) ||
	     state->interface == PHY_INTERFACE_MODE_SGMII) &&
@@ -1314,6 +1306,8 @@ void b53_phylink_mac_link_up(struct dsa_switch *ds, int port,
		return;

	if (mode == MLO_AN_FIXED) {
		b53_force_port_config(dev, port, speed, duplex,
				      tx_pause, rx_pause);
		b53_force_link(dev, port, true);
		return;
	}