[PATCH net-next v3 4/8] net: sparx5: use phy_interface_mode_is_rgmii()
Daniel Machon
daniel.machon at microchip.com
Wed Nov 20 02:57:41 PST 2024
> Hi,
>
> On Mon, Nov 18, 2024 at 02:00:50PM +0100, Daniel Machon wrote:
> > diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_phylink.c b/drivers/net/ethernet/microchip/sparx5/sparx5_phylink.c
> > index f8562c1a894d..cb55e05e5611 100644
> > --- a/drivers/net/ethernet/microchip/sparx5/sparx5_phylink.c
> > +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_phylink.c
> > @@ -32,6 +32,9 @@ sparx5_phylink_mac_select_pcs(struct phylink_config *config,
> > {
> > struct sparx5_port *port = netdev_priv(to_net_dev(config->dev));
> >
> > + if (phy_interface_mode_is_rgmii(interface))
> > + return NULL;
> > +
> > return &port->phylink_pcs;
>
> Maybe turn this into positive logic - return the PCS only when the
> interface mode requires the PCS?
Sure. I can flip the logic and return the PCS for the interface modes that are
advertised as supported.
/Daniel
More information about the linux-arm-kernel
mailing list