net: thunderx: start phy before starting autonegotiation
authorMian Yousaf Kaukab <ykaukab@suse.de>
Thu, 5 Dec 2019 09:41:16 +0000 (10:41 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 21 Dec 2019 09:57:13 +0000 (10:57 +0100)
commit1315608107f9f7ccd88e6626080f08421c0ae5b3
treeabbbe654a95d3984bc7b78ddd897ee8c6dca72a8
parent0c5a4dd6ae93216a5f1e0ef4d13cb3852354b3bd
net: thunderx: start phy before starting autonegotiation

[ Upstream commit a350d2e7adbb57181d33e3aa6f0565632747feaa ]

Since commit 2b3e88ea6528 ("net: phy: improve phy state checking")
phy_start_aneg() expects phy state to be >= PHY_UP. Call phy_start()
before calling phy_start_aneg() during probe so that autonegotiation
is initiated.

As phy_start() takes care of calling phy_start_aneg(), drop the explicit
call to phy_start_aneg().

Network fails without this patch on Octeon TX.

Fixes: 2b3e88ea6528 ("net: phy: improve phy state checking")
Signed-off-by: Mian Yousaf Kaukab <ykaukab@suse.de>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/cavium/thunder/thunder_bgx.c