Commit fa6c4084 authored by Jian Shen's avatar Jian Shen Committed by David S. Miller

net: hns3: fix loop condition of hns3_get_tx_timeo_queue_info()

In function hns3_get_tx_timeo_queue_info(), it should use
netdev->num_tx_queues, instead of netdve->real_num_tx_queues
as the loop limitation.

Fixes: 424eb834 ("net: hns3: Unified HNS3 {VF|PF} Ethernet Driver for hip08 SoC")
Signed-off-by: default avatarJian Shen <shenjian15@huawei.com>
Signed-off-by: default avatarPeng Li <lipeng321@huawei.com>
Signed-off-by: default avatarHuazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent beab694a
...@@ -1634,7 +1634,7 @@ static bool hns3_get_tx_timeo_queue_info(struct net_device *ndev) ...@@ -1634,7 +1634,7 @@ static bool hns3_get_tx_timeo_queue_info(struct net_device *ndev)
int i; int i;
/* Find the stopped queue the same way the stack does */ /* Find the stopped queue the same way the stack does */
for (i = 0; i < ndev->real_num_tx_queues; i++) { for (i = 0; i < ndev->num_tx_queues; i++) {
struct netdev_queue *q; struct netdev_queue *q;
unsigned long trans_start; unsigned long trans_start;
......
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