netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Huazhong Tan <tanhuazhong@huawei.com>
To: <davem@davemloft.net>
Cc: <netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<salil.mehta@huawei.com>, <yisen.zhuang@huawei.com>,
	<linuxarm@huawei.com>, Huazhong Tan <tanhuazhong@huawei.com>,
	Peng Li <lipeng321@huawei.com>
Subject: [PATCH net-next 08/12] net: hns3: handle empty unknown interrupt
Date: Fri, 28 Jun 2019 19:50:14 +0800	[thread overview]
Message-ID: <1561722618-12168-9-git-send-email-tanhuazhong@huawei.com> (raw)
In-Reply-To: <1561722618-12168-1-git-send-email-tanhuazhong@huawei.com>

Since some MSI-X interrupt's status may be cleared by hardware,
so when the driver receives the interrupt, reading
HCLGE_VECTOR0_PF_OTHER_INT_STS_REG register will get an empty
unknown interrupt. For this case, the irq handler should enable
vector0 interrupt. This patch also use dev_info() instead of
dev_dbg() in the hclge_check_event_cause(), since this information
will be useful for normal usage.

Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
---
 drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
index 896605f..62c6263 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
@@ -2783,8 +2783,9 @@ static u32 hclge_check_event_cause(struct hclge_dev *hdev, u32 *clearval)
 
 	/* check for vector0 msix event source */
 	if (msix_src_reg & HCLGE_VECTOR0_REG_MSIX_MASK) {
-		dev_dbg(&hdev->pdev->dev, "received event 0x%x\n",
-			msix_src_reg);
+		dev_info(&hdev->pdev->dev, "received event 0x%x\n",
+			 msix_src_reg);
+		*clearval = msix_src_reg;
 		return HCLGE_VECTOR0_EVENT_ERR;
 	}
 
@@ -2796,8 +2797,11 @@ static u32 hclge_check_event_cause(struct hclge_dev *hdev, u32 *clearval)
 	}
 
 	/* print other vector0 event source */
-	dev_dbg(&hdev->pdev->dev, "cmdq_src_reg:0x%x, msix_src_reg:0x%x\n",
-		cmdq_src_reg, msix_src_reg);
+	dev_info(&hdev->pdev->dev,
+		 "CMDQ INT status:0x%x, other INT status:0x%x\n",
+		 cmdq_src_reg, msix_src_reg);
+	*clearval = msix_src_reg;
+
 	return HCLGE_VECTOR0_EVENT_OTHER;
 }
 
@@ -2876,7 +2880,8 @@ static irqreturn_t hclge_misc_irq_handle(int irq, void *data)
 	}
 
 	/* clear the source of interrupt if it is not cause by reset */
-	if (event_cause == HCLGE_VECTOR0_EVENT_MBX) {
+	if (!clearval ||
+	    event_cause == HCLGE_VECTOR0_EVENT_MBX) {
 		hclge_clear_event_cause(hdev, event_cause, clearval);
 		hclge_enable_vector(&hdev->misc_vector, true);
 	}
-- 
2.7.4


  parent reply	other threads:[~2019-06-28 11:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-28 11:50 [PATCH net-next 00/12] net: hns3: some code optimizations & cleanups & bugfixes Huazhong Tan
2019-06-28 11:50 ` [PATCH net-next 01/12] net: hns3: fix __QUEUE_STATE_STACK_XOFF not cleared issue Huazhong Tan
2019-06-28 11:50 ` [PATCH net-next 02/12] net: hns3: enable DCB when TC num is one and pfc_en is non-zero Huazhong Tan
2019-06-28 18:47   ` Willem de Bruijn
2019-06-29  1:15     ` Yunsheng Lin
2019-06-28 11:50 ` [PATCH net-next 03/12] net: hns3: change SSU's buffer allocation according to UM Huazhong Tan
2019-06-28 11:50 ` [PATCH net-next 04/12] net: hns3: add some error checking in hclge_tm module Huazhong Tan
2019-06-28 11:50 ` [PATCH net-next 05/12] net: hns3: fix a -Wformat-nonliteral compile warning Huazhong Tan
2019-06-28 11:50 ` [PATCH net-next 06/12] net: hns3: add Asym Pause support to fix autoneg problem Huazhong Tan
2019-06-28 11:50 ` [PATCH net-next 07/12] net: hns3: re-schedule reset task while VF reset fail Huazhong Tan
2019-06-28 11:50 ` Huazhong Tan [this message]
2019-06-28 11:50 ` [PATCH net-next 09/12] net: hns3: fix a statistics issue about l3l4 checksum error Huazhong Tan
2019-06-28 11:50 ` [PATCH net-next 10/12] net: hns3: remove unused linkmode definition Huazhong Tan
2019-06-28 11:50 ` [PATCH net-next 11/12] net: hns3: remove RXD_VLD check in hns3_handle_bdinfo Huazhong Tan
2019-06-28 11:50 ` [PATCH net-next 12/12] net: hns3: optimize the CSQ cmd error handling Huazhong Tan
2019-06-28 16:40 ` [PATCH net-next 00/12] net: hns3: some code optimizations & cleanups & bugfixes David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1561722618-12168-9-git-send-email-tanhuazhong@huawei.com \
    --to=tanhuazhong@huawei.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=lipeng321@huawei.com \
    --cc=netdev@vger.kernel.org \
    --cc=salil.mehta@huawei.com \
    --cc=yisen.zhuang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).