[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200618010211.75840-5-song.bao.hua@hisilicon.com>
Date: Thu, 18 Jun 2020 13:02:10 +1200
From: Barry Song <song.bao.hua@...ilicon.com>
To: <davem@...emloft.net>, <kuba@...nel.org>
CC: <yisen.zhuang@...wei.com>, <salil.mehta@...wei.com>,
<netdev@...r.kernel.org>, <linyunsheng@...wei.com>,
<linux-kernel@...r.kernel.org>, <linuxarm@...wei.com>,
Barry Song <song.bao.hua@...ilicon.com>
Subject: [PATCH 4/5] net: hns3: replace disable_irq by IRQ_NOAUTOEN flag
disable_irq() after request_irq() is still risk as there is a chance irq
can come after request_irq() and before disable_irq().
this should be done by IRQ_NOAUTOEN flag.
Signed-off-by: Barry Song <song.bao.hua@...ilicon.com>
---
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
index 3cd2216e49b9..1330820152fa 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
@@ -8,6 +8,7 @@
#include <linux/cpu_rmap.h>
#endif
#include <linux/if_vlan.h>
+#include <linux/irq.h>
#include <linux/ip.h>
#include <linux/ipv6.h>
#include <linux/module.h>
@@ -154,6 +155,7 @@ static int hns3_nic_init_irq(struct hns3_nic_priv *priv)
tqp_vectors->name[HNAE3_INT_NAME_LEN - 1] = '\0';
+ irq_set_status_flags(tqp_vectors->vector_irq, IRQ_NOAUTOEN);
ret = request_irq(tqp_vectors->vector_irq, hns3_irq_handle, 0,
tqp_vectors->name, tqp_vectors);
if (ret) {
@@ -163,8 +165,6 @@ static int hns3_nic_init_irq(struct hns3_nic_priv *priv)
return ret;
}
- disable_irq(tqp_vectors->vector_irq);
-
irq_set_affinity_hint(tqp_vectors->vector_irq,
&tqp_vectors->affinity_mask);
--
2.23.0
Powered by blists - more mailing lists