[PATCH net-next 3/7] net: sparx5: use is_port_rgmii() throughout

Daniel Machon daniel.machon at microchip.com
Fri Nov 8 00:59:56 PST 2024


Hi Andrew,

> > +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_port.c
> > @@ -1087,6 +1087,9 @@ int sparx5_port_init(struct sparx5 *sparx5,
> >                ANA_CL_FILTER_CTRL_FILTER_SMAC_MC_DIS,
> >                sparx5, ANA_CL_FILTER_CTRL(port->portno));
> >
> > +     if (ops->is_port_rgmii(port->portno))
> > +             return 0;
> > +
> >       /* Configure MAC vlan awareness */
> >       err = sparx5_port_max_tags_set(sparx5, port);
> >       if (err)
> 
> That looks odd. What has RGMII to do with MAC VLAN awareness?
> Maybe it just needs a comment?

The sparx5_port_init() function initializes the RGMII port device (and
the other types of devices too). After the common configuration is done,
we bail out, as we do not want to configure any 2g5, 5g, 10g or 25g
stuff.

I can add a comment, sure.

> 
>         Andrew

/Daniel



More information about the linux-arm-kernel mailing list