[PATCH] net: dsa: mt7530: add support for in-band link status
Russell King (Oracle)
linux at armlinux.org.uk
Sun Sep 11 12:58:15 PDT 2022
Hi,
Just two points please:
On Sat, Sep 10, 2022 at 02:12:12AM +0100, Daniel Golle wrote:
> +static void
> +mt7531_sgmii_pcs_get_state_inband(struct mt7530_priv *priv, int port,
> + struct phylink_link_state *state)
> +{
> + unsigned int val;
> +
> + val = mt7530_read(priv, MT7531_PCS_CONTROL_1(port));
> + state->link = !!(val & MT7531_SGMII_LINK_STATUS);
> + if (!state->link)
> + return;
> +
> + if (state->interface == PHY_INTERFACE_MODE_2500BASEX)
> + state->speed = SPEED_2500;
> + else
> + state->speed = SPEED_1000;
> +
> + state->duplex = DUPLEX_FULL;
> + state->pause = 0;
MLO_PAUSE_NONE please.
Also, please set state->an_complete appropriately.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
More information about the Linux-mediatek
mailing list