]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: marvell: mvpp2: fix stuck in-band SGMII negotiation
authorRussell King <rmk+kernel@armlinux.org.uk>
Fri, 8 Feb 2019 15:35:43 +0000 (15:35 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Apr 2019 20:33:09 +0000 (22:33 +0200)
commita78aae93ba9c8e00a2055ebf5644cca8666f9805
tree844c72193baaf87f9e1e3df4b4c7428476d036df
parent1f3694865d5600bb23938f26a6effa843dc7cbca
net: marvell: mvpp2: fix stuck in-band SGMII negotiation

[ Upstream commit 316734fdcf70900a83065360cff11a5826919067 ]

It appears that the mvpp22 can get stuck with SGMII negotiation.  The
symptoms are that in-band negotiation never completes and the partner
(eg, PHY) never reports SGMII link up, or if it supports negotiation
bypass, goes into negotiation bypass mode (which will happen when the
PHY sees that the MAC is alive but gets no response.)

Triggering the PHY end of the link to re-negotiate results in the
bypass bit clearing on the PHY, and then re-setting - indicating that
the problem is at the mvpp22 GMAC end.

Asserting the GMAC reset and de-asserting it resolves the issue.
Arrange to assert the GMAC reset at probe time, and deassert it only
after we have configured the GMAC for the appropriate mode.  This
resolves the issue.

Tested-by: Sven Auhagen <sven.auhagen@voleatech.de>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c