]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
net: hns3: fix an issue for hns3_update_new_int_gl
authorPeng Li <lipeng321@huawei.com>
Sat, 2 Feb 2019 14:39:27 +0000 (22:39 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Dec 2019 08:21:18 +0000 (09:21 +0100)
[ Upstream commit 6241e71e7207102ffc733991f7a00f74098d7da0 ]

HNS3 supports setting rx-usecs|tx-usecs as 0, but it will not
update dynamically when adaptive-tx or adaptive-rx is enable.
This patch removes the Redundant check.

Fixes: a95e1f8666e9 ("net: hns3: change the time interval of int_gl calculating")
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

index 3708f149d0a6a69f7ea4ee84ceb4e31eac3503e1..b2860087a7dc7d7c1eacd641b6565c863c957956 100644 (file)
@@ -2366,7 +2366,7 @@ static bool hns3_get_new_int_gl(struct hns3_enet_ring_group *ring_group)
        u32 time_passed_ms;
        u16 new_int_gl;
 
-       if (!ring_group->coal.int_gl || !tqp_vector->last_jiffies)
+       if (!tqp_vector->last_jiffies)
                return false;
 
        if (ring_group->total_packets == 0) {