aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/cavium/octeon
diff options
context:
space:
mode:
authorIvan Khoronzhuk <ivan.khoronzhuk@gmail.com>2020-09-25 15:44:39 +0300
committerDavid S. Miller <davem@davemloft.net>2020-09-25 16:51:31 -0700
commit4663ff60257aec4ee1e2e969a7c046f0aff35ab8 (patch)
tree80bbf5fe68f9474add925705158deaac67a03c6d /drivers/net/ethernet/cavium/octeon
parentnet: stmmac: Fix clock handling on remove path (diff)
downloadlinux-dev-4663ff60257aec4ee1e2e969a7c046f0aff35ab8.tar.xz
linux-dev-4663ff60257aec4ee1e2e969a7c046f0aff35ab8.zip
net: ethernet: cavium: octeon_mgmt: use phy_start and phy_stop
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: 74a992b3598a ("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>
Diffstat (limited to 'drivers/net/ethernet/cavium/octeon')
-rw-r--r--drivers/net/ethernet/cavium/octeon/octeon_mgmt.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c b/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c
index 3e17ce0d2314..6cb2162a75d4 100644
--- a/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c
+++ b/drivers/net/ethernet/cavium/octeon/octeon_mgmt.c
@@ -1219,7 +1219,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);
@@ -1247,8 +1247,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);