summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
diff options
context:
space:
mode:
authorQianqian Xie <xieqianqian@huawei.com>2016-06-21 11:56:29 +0800
committerDavid S. Miller <davem@davemloft.net>2016-06-21 04:51:55 -0400
commitbb7189dc78d643b2707483763664a02ac017ac59 (patch)
treef40717a9baefb9e67501844cdb4aec15b7a2a44d /drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
parentcba80bdea72cb24a93bd00286673991ffb4a6b31 (diff)
net: hns: fix the wrong speed for bond
For debug-ports,there are two non-synchronized processes: Speed-Auto-Negotiation and Link-Update-Status. The two processes are towed by two different state machines. Bond reads the speed when link up, but the speed maybe not update the right value at that time.That make for bond's wrong speed. Thus only one state machine should be used and if phy_state_machine is used, it does not need to do hns_nic_update_link_status(). Signed-off-by: Qianqian Xie <xieqianqian@huawei.com> Signed-off-by: Yisen Zhuang <Yisen.Zhuang@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/hisilicon/hns/hns_ethtool.c')
-rw-r--r--drivers/net/ethernet/hisilicon/hns/hns_ethtool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c b/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
index 5b3dccb32775..564ae1ec6aa8 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c
@@ -49,7 +49,7 @@ static u32 hns_nic_get_link(struct net_device *net_dev)
h = priv->ae_handle;
if (priv->phy) {
- if (!genphy_update_link(priv->phy))
+ if (!genphy_read_status(priv->phy))
link_stat = priv->phy->link;
else
link_stat = 0;