]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
net: pcs: xpcs: fix incorrect CL37 AN sequence
authorWong Vee Khee <vee.khee.wong@linux.intel.com>
Tue, 5 Oct 2021 03:45:21 +0000 (11:45 +0800)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 Oct 2021 12:10:24 +0000 (13:10 +0100)
commite3cf002d5a4452f8adc5543df341cf96fd702fcf
treea2c14c5c9bb546c0b3e959de7621fe3cf0f36ba0
parent25a9da6641f1f66006e93ddbefee13a437efa8c0
net: pcs: xpcs: fix incorrect CL37 AN sequence

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@nxp.com>
Signed-off-by: Wong Vee Khee <vee.khee.wong@linux.intel.com>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/pcs/pcs-xpcs.c