aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
diff options
context:
space:
mode:
authorYunsheng Lin <linyunsheng@huawei.com>2019-10-31 19:23:17 +0800
committerDavid S. Miller <davem@davemloft.net>2019-10-31 12:03:23 -0700
commit647522a5ef6401dcdb8ec417421e43fb21910167 (patch)
tree3689ece98057553ae6fe8a0287c10589c7312bc9 /drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
parentnet: hns3: dump some debug information when reset fail (diff)
downloadlinux-dev-647522a5ef6401dcdb8ec417421e43fb21910167.tar.xz
linux-dev-647522a5ef6401dcdb8ec417421e43fb21910167.zip
net: hns3: add struct netdev_queue debug info for TX timeout
When there is a TX timeout, we can tell if the driver or stack has stopped the queue by looking at state field, and when has the last packet transmited by looking at trans_start field. So this patch prints these two field in the hns3_get_tx_timeo_queue_info(). Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com> Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/net/ethernet/hisilicon/hns3/hns3_enet.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
index 0fdd684a8524..23bdfe8583da 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
@@ -1792,6 +1792,9 @@ static bool hns3_get_tx_timeo_queue_info(struct net_device *ndev)
time_after(jiffies,
(trans_start + ndev->watchdog_timeo))) {
timeout_queue = i;
+ netdev_info(ndev, "queue state: 0x%lx, delta msecs: %u\n",
+ q->state,
+ jiffies_to_msecs(jiffies - trans_start));
break;
}
}