Commit 90a505b9 authored by lisheng's avatar lisheng Committed by David S. Miller

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: default avataryankejian <yankejian@huawei.com>
Signed-off-by: default avatarYisen Zhuang <yisen.zhuang@huawei.com>
Signed-off-by: default avatarlisheng <lisheng011@huawei.com>
Signed-off-by: default avatarlipeng <lipeng321@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 20ddb1d3
...@@ -1315,16 +1315,15 @@ static void hns_nic_reset_subtask(struct hns_nic_priv *priv) ...@@ -1315,16 +1315,15 @@ static void hns_nic_reset_subtask(struct hns_nic_priv *priv)
return; return;
hns_nic_dump(priv); hns_nic_dump(priv);
netdev_err(priv->netdev, "Reset %s port\n", netdev_info(priv->netdev, "Reset %s port\n",
(type == HNAE_PORT_DEBUG ? "debug" : "business")); (type == HNAE_PORT_DEBUG ? "debug" : "business"));
rtnl_lock(); 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); hns_nic_net_reinit(priv->netdev);
} else {
hns_nic_net_down(priv->netdev);
hns_nic_net_reset(priv->netdev);
}
rtnl_unlock(); rtnl_unlock();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment