提交 beab694a 编写于 作者: J Jian Shen 提交者: David S. Miller

net: hns3: refine tx timeout count handle

In current codes, tx_timeout_cnt is used before increased,
then we can see the tx_timeout_count is still 0 from the
print when tx timeout happens, e.g.
"hns3 0000:7d:00.3 eth3: tx_timeout count: 0, queue id: 0, SW_NTU:
 0xa6, SW_NTC: 0xa4, HW_HEAD: 0xa4, HW_TAIL: 0xa6, INT: 0x1"

The tx_timeout_cnt should be updated before used.
Signed-off-by: NJian Shen <shenjian15@huawei.com>
Signed-off-by: NPeng Li <lipeng321@huawei.com>
Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 fbf3cd3f
...@@ -1655,6 +1655,8 @@ static bool hns3_get_tx_timeo_queue_info(struct net_device *ndev) ...@@ -1655,6 +1655,8 @@ static bool hns3_get_tx_timeo_queue_info(struct net_device *ndev)
return false; return false;
} }
priv->tx_timeout_count++;
tx_ring = priv->ring_data[timeout_queue].ring; tx_ring = priv->ring_data[timeout_queue].ring;
hw_head = readl_relaxed(tx_ring->tqp->io_base + hw_head = readl_relaxed(tx_ring->tqp->io_base +
...@@ -1682,8 +1684,6 @@ static void hns3_nic_net_timeout(struct net_device *ndev) ...@@ -1682,8 +1684,6 @@ static void hns3_nic_net_timeout(struct net_device *ndev)
if (!hns3_get_tx_timeo_queue_info(ndev)) if (!hns3_get_tx_timeo_queue_info(ndev))
return; return;
priv->tx_timeout_count++;
/* request the reset, and let the hclge to determine /* request the reset, and let the hclge to determine
* which reset level should be done * which reset level should be done
*/ */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册