blob: cf1d5c483bb383c61696ae34e9215b479350f715 [file] [log] [blame]
From 5c7bd4285655056ca721692504ed8aa0da17f9b6 Mon Sep 17 00:00:00 2001
From: Huazhong Tan <>
Date: Fri, 16 Aug 2019 16:09:41 +0800
Subject: [PATCH] net: hns3: prevent unnecessary MAC TNL interrupt
commit 20981a1e6b708536493e10ba90016ae28a9f3749 upstream.
MAC TNL interrupt is used to collect statistic info about
link status changing suddenly when netdev is running.
But when stopping netdev, the enabled MAC TNL interrupt is
unnecessary, and may add some noises to the statistic info.
So this patch disables it before stopping MAC.
Fixes: a63457878b12 ("net: hns3: Add handling of MAC tunnel interruption")
Signed-off-by: Huazhong Tan <>
Reviewed-by: Yunsheng Lin <>
Signed-off-by: David S. Miller <>
Signed-off-by: Paul Gortmaker <>
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
index f3cb272f24d8..49dbfcc649dd 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
@@ -5901,6 +5901,8 @@ static void hclge_ae_stop(struct hnae3_handle *handle)
for (i = 0; i < handle->kinfo.num_tqps; i++)
hclge_reset_tqp(handle, i);
+ hclge_config_mac_tnl_int(hdev, false);
/* Mac disable */
hclge_cfg_mac_mode(hdev, false);