Commit 360dd5a7 authored by Jian Shen's avatar Jian Shen Committed by Greg Kroah-Hartman

net: hns3: fix loop condition of hns3_get_tx_timeo_queue_info()

[ Upstream commit fa6c4084 ]

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>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 938251ee
...@@ -1464,7 +1464,7 @@ static bool hns3_get_tx_timeo_queue_info(struct net_device *ndev) ...@@ -1464,7 +1464,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