mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-12 07:37:31 -04:00
net: ethernet: cavium: octeon_mgmt: use phy_start and phy_stop
[ Upstream commit 4663ff60257aec4ee1e2e969a7c046f0aff35ab8 ]
To start also "phy state machine", with UP state as it should be,
the phy_start() has to be used, in another case machine even is not
triggered. After this change negotiation is supposed to be triggered
by SM workqueue.
It's not correct usage, but it appears after the following patch,
so add it as a fix.
Fixes: 74a992b359 ("net: phy: add phy_check_link_status")
Signed-off-by: Ivan Khoronzhuk <ikhoronz@cisco.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
e987ea087f
commit
3ce96a55b7
1 changed files with 4 additions and 2 deletions
|
|
@ -1222,7 +1222,7 @@ static int octeon_mgmt_open(struct net_device *netdev)
|
|||
*/
|
||||
if (netdev->phydev) {
|
||||
netif_carrier_off(netdev);
|
||||
phy_start_aneg(netdev->phydev);
|
||||
phy_start(netdev->phydev);
|
||||
}
|
||||
|
||||
netif_wake_queue(netdev);
|
||||
|
|
@ -1250,8 +1250,10 @@ static int octeon_mgmt_stop(struct net_device *netdev)
|
|||
napi_disable(&p->napi);
|
||||
netif_stop_queue(netdev);
|
||||
|
||||
if (netdev->phydev)
|
||||
if (netdev->phydev) {
|
||||
phy_stop(netdev->phydev);
|
||||
phy_disconnect(netdev->phydev);
|
||||
}
|
||||
|
||||
netif_carrier_off(netdev);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue