RE: [PATCH net-next 2/2] net: dsa: microchip: Add SGMII port support to KSZ9477 switch
From: Tristram.Ha
Date: Mon Nov 11 2024 - 21:44:10 EST
> Subject: Re: [PATCH net-next 2/2] net: dsa: microchip: Add SGMII port support to
> KSZ9477 switch
>
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content
> is safe
>
> On Sat, 9 Nov 2024 at 03:56, <Tristram.Ha@xxxxxxxxxxxxx> wrote:
> > diff --git a/drivers/net/dsa/microchip/ksz_common.c
> b/drivers/net/dsa/microchip/ksz_common.c
> > index f73833e24622..8163342d778a 100644
> > --- a/drivers/net/dsa/microchip/ksz_common.c
> > +++ b/drivers/net/dsa/microchip/ksz_common.c
> > @@ -354,10 +354,30 @@ static void ksz9477_phylink_mac_link_up(struct
> phylink_config *config,
> > int speed, int duplex, bool tx_pause,
> > bool rx_pause);
> >
> > +static struct phylink_pcs *
> > +ksz_phylink_mac_select_pcs(struct phylink_config *config,
> > + phy_interface_t interface)
> > +{
> > + struct dsa_port *dp = dsa_phylink_to_port(config);
> > + struct ksz_device *dev = dp->ds->priv;
> > + struct ksz_port *p = &dev->ports[dp->index];
> > +
> > + if (!p->sgmii)
> > + return ERR_PTR(-EOPNOTSUPP);
>
> Since commit 7530ea26c810 ("net: phylink: remove "using_mac_select_pcs""),
> returning ERR_PTR(-EOPNOTSUPP) here would actually be fatal. This error
> code no longer carries any special meaning.
>
> It would be a good idea to Cc Russell King for phylink changes.
Thanks. Will update the code.