Re: [PATCH net-next v2] net: dsa: mv88e6xxx: Add erratum 3.14 for 88E6390X and 88E6190X

From: Ante Knezic
Date: Wed Jul 19 2023 - 08:32:21 EST


> > It needs to be implemented exactly as posted here? After mv88e6390_serdes_power()
> > is called on any port/lane, mv88e6390x_serdes_erratum_3_14() needs to run
> > for all lanes? That might be a problem.
>
> Actually, I tested applying erratum only on requested lane in pcs_post_config and
> it seems to work out fine, so we might use something like:
> static int mv88e6390_erratum_3_14(struct mv88e639x_pcs *mpcs)
> {
> int err;
>
> /* 88e6190x and 88e6390x errata 3.14:
> * After chip reset, SERDES reconfiguration or SERDES core
> * Software Reset, the SERDES lanes may not be properly aligned
> * resulting in CRC errors
> */
>
> err = mdiodev_c45_write(&mpcs->mdio, MDIO_MMD_PHYXS,
> 0xf054, 0x400C);
> if (err)
> return err;
>
> err = mdiodev_c45_write(&mpcs->mdio, MDIO_MMD_PHYXS,
> 0xf054, 0x4000);
> if (err)
> return err;
>
> return 0;
> }

Unfortunatelly, above statement is not correct. I managed to occasionally replicate
the issue when applying erratum on requested lane only. This happens on occasion
only but it looks like we need to apply erratum on all serdes lanes to ensure
proper operation.
The Errata document falls short on this detail and does not clearly state whether all
or only specific lanes need to be written to.