[PATCH v2] net: dsa: mt7530: add support for in-band link status
Daniel Golle
daniel at makrotopia.org
Tue Sep 20 15:28:57 PDT 2022
On Mon, Sep 19, 2022 at 06:36:22PM -0700, Jakub Kicinski wrote:
> On Sun, 11 Sep 2022 21:45:30 +0100 Daniel Golle wrote:
> > static void mt7531_pcs_get_state(struct phylink_pcs *pcs,
> > struct phylink_link_state *state)
> > {
> > struct mt7530_priv *priv = pcs_to_mt753x_pcs(pcs)->priv;
> > int port = pcs_to_mt753x_pcs(pcs)->port;
> > + unsigned int val;
> >
> > - if (state->interface == PHY_INTERFACE_MODE_SGMII)
> > + if (state->interface == PHY_INTERFACE_MODE_SGMII) {
> > mt7531_sgmii_pcs_get_state_an(priv, port, state);
> > - else
> > - state->link = false;
> > + return;
> > + } else if ((state->interface == PHY_INTERFACE_MODE_1000BASEX) ||
> > + (state->interface == PHY_INTERFACE_MODE_2500BASEX)) {
> > + mt7531_sgmii_pcs_get_state_inband(priv, port, state);
> > + return;
> > + }
> > +
> > + state->link = false;
>
> drivers/net/dsa/mt7530.c:3040:15: warning: unused variable 'val' [-Wunused-variable]
> unsigned int val;
> ^
Oops, forgot that one there. Just sent out v3 with this fixed and
an_complete handled more decently.
Thank you for the review!
More information about the Linux-mediatek
mailing list