[PATCH net v3 2/2] net: pcs: xpcs: make supported_interfaces authoritative

Coia Prant coiaprant at gmail.com
Tue Nov 10 07:57:21 PST 2026


Paolo Abeni <pabeni at redhat.com> 于2026年11月10日周二 22:41写道:
>
> On 11/2/26 22:25, Coia Prant wrote:
> > diff --git a/drivers/net/pcs/pcs-xpcs-rk.c b/drivers/net/pcs/pcs-xpcs-rk.c
> > index 6f0a110e32d2..25fdc9c6b72c 100644
> > --- a/drivers/net/pcs/pcs-xpcs-rk.c
> > +++ b/drivers/net/pcs/pcs-xpcs-rk.c
> > @@ -483,6 +483,7 @@ struct dw_xpcs *xpcs_rk_create(struct device *dev, struct device_node *pcs, int
> >       struct platform_device *pdev;
> >       struct dw_xpcs_rk *pxpcs;
> >       struct dw_xpcs *xpcs;
> > +     DECLARE_PHY_INTERFACE_MASK_ZERO(supported_interfaces);
>
> Please respect the reverse christmas tree order above.
>
> >
> >       if (!of_device_is_available(pcs))
> >               return ERR_PTR(-ENODEV);
> > @@ -536,6 +537,15 @@ struct dw_xpcs *xpcs_rk_create(struct device *dev, struct device_node *pcs, int
> >               return xpcs;
> >       }
> >
> > +     /*
> > +      * The RK3568 XPCS supports 1000BASE-X, SGMII and QSGMII.
> > +      */
> > +     __set_bit(PHY_INTERFACE_MODE_1000BASEX, supported_interfaces);
> > +     __set_bit(PHY_INTERFACE_MODE_SGMII, supported_interfaces);
> > +     __set_bit(PHY_INTERFACE_MODE_QSGMII, supported_interfaces);
>
> Sashiko thinks this last statement is a no op:
>
> https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261102212506.3348537-1-coiaprant@gmail.com
>
> I don't think this is 'net' material, I suggest resubmitting for
> net-next.
>
> /P

Hi Paolo,

Thanks for the review.

1. Reverse Christmas tree: My bad, I will move the
   `DECLARE_PHY_INTERFACE_MASK_ZERO` declaration to the top of the
   function to comply with the variable ordering.

2. QSGMII no-op: Sashiko is right, it is currently a no-op. The core's
   compat table does not have an entry for QSGMII, so the intersection
   (phy_interface_and) filters it out. This actually demonstrates the
   intended behavior perfectly: the glue reports what the hardware can
   do, and the core filters it based on what it actually supports. If
   the core adds QSGMII support in the future, the glue will
   automatically pick it up. I'll add a brief note in the commit
   message to clarify this.

3. Tree selection: Understood. I will rebase and resubmit the series
   for net-next.

Coia



More information about the Linux-rockchip mailing list