summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorMarek BehĂșn <kabel@kernel.org>2021-11-08 22:49:18 +0100
committerDavid S. Miller <davem@davemloft.net>2021-11-10 14:34:02 +0000
commitbb7bbb6e36474933540c24ae1f1ad651b843981f (patch)
tree480081cef57766f7e9b6cbb593a4fc5d5c2663a3 /net
parent7a166854b4e24c57d56b3eba9fe1594985ee0a2c (diff)
net: marvell: mvpp2: Fix wrong SerDes reconfiguration order
Commit bfe301ebbc94 ("net: mvpp2: convert to use mac_prepare()/mac_finish()") introduced a bug wherein it leaves the MAC RESET register asserted after mac_finish(), due to wrong order of function calls. Before it was: .mac_config() mvpp22_mode_reconfigure() assert reset mvpp2_xlg_config() deassert reset Now it is: .mac_prepare() .mac_config() mvpp2_xlg_config() deassert reset .mac_finish() mvpp2_xlg_config() assert reset Obviously this is wrong. This bug is triggered when phylink tries to change the PHY interface mode from a GMAC mode (sgmii, 1000base-x, 2500base-x) to XLG mode (10gbase-r, xaui). The XLG mode does not work since reset is left asserted. Only after ifconfig down && ifconfig up is called will the XLG mode work. Move the call to mvpp22_mode_reconfigure() to .mac_prepare() implementation. Since some of the subsequent functions need to know whether the interface is being changed, we unfortunately also need to pass around the new interface mode before setting port->phy_interface. Fixes: bfe301ebbc94 ("net: mvpp2: convert to use mac_prepare()/mac_finish()") Signed-off-by: Marek BehĂșn <kabel@kernel.org> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions