RE: [PATCH net-next v12 15/15] net: ethernet: onsemi: s2500: Add driver support for S2500

From: Selvamani Rajagopal

Date: Mon Nov 30 2026 - 02:11:49 EST



> -----Original Message-----
> From: netdev-bot+sashiko@xxxxxxxxxx <netdev-bot+sashiko@xxxxxxxxxx>
> Sent: Saturday, November 28, 2026 4:37 PM
> To: Selvamani Rajagopal <Selvamani.Rajagopal@xxxxxxxxxx>
> Subject: Re: [PATCH net-next v12 15/15] net: ethernet: onsemi: s2500: Add driver
> support for S2500
>


> [Severity: Medium]
> What happens if nothing calls s2500_update_stats() for more than LONG_MAX
> jiffies?


Will reset the stats timestamp when the interface is brought up. Will fix it
the next submission.

> [ ... ]
>
> > +static int s2500_set_mac_filter(struct net_device *ndev, const u8 *mac)
> > +{
> > + struct s2500_info *priv = netdev_priv(ndev);
> > + int ret;
> > +
> > + /* Disable slot 0 before programming its address. */
> > + ret = oa_tc6_write_register_mms(priv->tc6, OA_TC6_MAC_MMS1,
> > + S2500_REG_MAC_ADDRFILTH(0), 0);
> > + if (ret)
> > + return ret;
> > +
> > + return s2500_write_filter(priv, 0, mac);
> > +}
>
> [Severity: Medium]
> What state is slot 0 left in if one of the four control writes in
> s2500_write_filter() fails?


This is another case of SPI write failure. There is no way we can
write a robust code, when underlying read/write APIs fails. There is
no guarantee that our recovery code would, even if we try.


> --
> Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261124-s2500-
> mac-phy-support-v12-0-3575855d99f9%40onsemi.com
> <https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261124-s2500-mac-phy-support-v12-0-3575855d99f9%40onsemi.com
> =netdev-ai.bots.linux.dev>