lkml.org 
[lkml]   [2020]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.19 318/639] net: hns3: fix loop condition of hns3_get_tx_timeo_queue_info()
    Date
    From: Jian Shen <shenjian15@huawei.com>

    [ Upstream commit fa6c4084b98b82c98cada0f0d5c9f8577579f962 ]

    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: 424eb834a9be ("net: hns3: Unified HNS3 {VF|PF} Ethernet Driver for hip08 SoC")
    Signed-off-by: Jian Shen <shenjian15@huawei.com>
    Signed-off-by: Peng Li <lipeng321@huawei.com>
    Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
    index 10fa7f5df57e7..3eb8b85f6afb6 100644
    --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
    +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
    @@ -1464,7 +1464,7 @@ static bool hns3_get_tx_timeo_queue_info(struct net_device *ndev)
    int i;

    /* 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;
    unsigned long trans_start;

    --
    2.20.1


    \
     
     \ /
      Last update: 2020-01-24 12:18    [W:5.853 / U:0.284 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site