aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/hisilicon/hns/hns_enet.c
diff options
context:
space:
mode:
authorlisheng <lisheng011@huawei.com>2015-10-16 17:03:20 +0800
committerDavid S. Miller <davem@davemloft.net>2015-10-18 19:57:08 -0700
commit90a505b9f607bf09525bb8eb766b73a658675b38 (patch)
tree31c4328e75a5aad1033e4d07b6a30681e41fc734 /drivers/net/ethernet/hisilicon/hns/hns_enet.c
parentnet: hns: fixes the issue by using ethtool -s (diff)
downloadlinux-dev-90a505b9f607bf09525bb8eb766b73a658675b38.tar.xz
linux-dev-90a505b9f607bf09525bb8eb766b73a658675b38.zip
net: hns: fixes a bug about timeout by pause frame
this patch fixes the bug triggered timeout sequence. when the connective ports cannot accept the packets with higher speed, they will send out the pause frame to the Soc's mac. At that time, the driver resets the relevant of the Soc, then it causes the packets cannot be sent out immediately. this patch fixes the issue. Signed-off-by: yankejian <yankejian@huawei.com> Signed-off-by: Yisen Zhuang <yisen.zhuang@huawei.com> Signed-off-by: lisheng <lisheng011@huawei.com> Signed-off-by: lipeng <lipeng321@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/net/ethernet/hisilicon/hns/hns_enet.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_enet.c b/drivers/net/ethernet/hisilicon/hns/hns_enet.c
index 6f9091c29869..302d3ae8e9e5 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_enet.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_enet.c
@@ -1315,16 +1315,15 @@ static void hns_nic_reset_subtask(struct hns_nic_priv *priv)
return;
hns_nic_dump(priv);
- netdev_err(priv->netdev, "Reset %s port\n",
- (type == HNAE_PORT_DEBUG ? "debug" : "business"));
+ netdev_info(priv->netdev, "Reset %s port\n",
+ (type == HNAE_PORT_DEBUG ? "debug" : "business"));
rtnl_lock();
- if (type == HNAE_PORT_DEBUG) {
+ /* put off any impending NetWatchDogTimeout */
+ priv->netdev->trans_start = jiffies;
+
+ if (type == HNAE_PORT_DEBUG)
hns_nic_net_reinit(priv->netdev);
- } else {
- hns_nic_net_down(priv->netdev);
- hns_nic_net_reset(priv->netdev);
- }
rtnl_unlock();
}