Re: [PATCH net-next 2/2] net: pcs: xpcs: fix incorrect CL37 AN sequence

From: Wong Vee Khee
Date: Wed Sep 29 2021 - 07:46:41 EST


On Tue, Sep 28, 2021 at 10:41:04AM +0000, Vladimir Oltean wrote:
> On Tue, Sep 28, 2021 at 12:19:38PM +0800, Wong Vee Khee wrote:
> > According to Synopsys DesignWare Cores Ethernet PCS databook, it is
> > required to disable Clause 37 auto-negotiation by programming bit-12
> > (AN_ENABLE) to 0 if it is already enabled, before programming various
> > fields of VR_MII_AN_CTRL registers.
> >
> > After all these programming are done, it is then required to enable
> > Clause 37 auto-negotiation by programming bit-12 (AN_ENABLE) to 1.
> >
> > Cc: Vladimir Oltean <vladimir.oltean@xxxxxxx>
> > Signed-off-by: Wong Vee Khee <vee.khee.wong@xxxxxxxxxxxxxxx>
> > ---
>
> Other comments:
>
> - please provide a Fixes: tag, like:
>
> Fixes: b97b5331b8ab ("net: pcs: add C37 SGMII AN support for intel mGbE controller")
>
> (just like that, not split on multiple lines)
>
> - please target the patches to the "net" tree. I see the xpcs_modify
> patch has other stuff in its context (nxp_sja1105) that will conflict
> with the tree in which the bad commit was originally introduced, so I
> think the easiest way would be if you could just open-code the initial
> clearing of bit MDIO_AN_CTRL1_ENABLE. You could then wait until "net"
> merges with "net-next" again and do the other cleanups afterwards - it
> looks like other places could use a _modify method as well, just
> looking at DW_VR_MII_AN_CTRL, DW_VR_MII_DIG_CTRL1. Also, the complete
> replacement of DW_VR_MII_MMD_CTRL with MDIO_CTRL1 can also be done in
> net-next. Just try to keep the fix minimally self-contained.

Sure! will mark this target for 'net' for v2.