Re: [PATCH net v4 1/1] net: pcs: xpcs: fix incorrect CL37 AN sequence

From: Vladimir Oltean
Date: Tue Oct 05 2021 - 08:07:37 EST


On Tue, Oct 05, 2021 at 11:45:21AM +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.
>
> Fixes: b97b5331b8ab ("net: pcs: add C37 SGMII AN support for intel mGbE controller")
> Cc: Vladimir Oltean <vladimir.oltean@xxxxxxx>
> Signed-off-by: Wong Vee Khee <vee.khee.wong@xxxxxxxxxxxxxxx>
> ---

Reviewed-by: Vladimir Oltean <vladimir.oltean@xxxxxxx>
Tested-by: Vladimir Oltean <vladimir.oltean@xxxxxxx>

> v3 -> v4:
> - Removed redunctant 'changed' variable.

s/redunctant/redundant/

> v2 -> v3:
> - Added error handling after xpcs_write().
> - Added 'changed' flag.
> - Added fixes tag.
> v1 -> v2:
> - Removed use of xpcs_modify() helper function.
> - Add conditional check on inband auto-negotiation.
> ---