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>, Shiju Jose <shiju.jose@huawei.com>,
Peng Li <lipeng321@huawei.com>,
"Huazhong Tan" <tanhuazhong@huawei.com>
Subject: [PATCH net-next 04/12] net: hns3: add recovery for the H/W errors occurred before the HNS dev initialization
Date: Thu, 13 Jun 2019 17:12:24 +0800 [thread overview]
Message-ID: <1560417152-53050-5-git-send-email-tanhuazhong@huawei.com> (raw)
In-Reply-To: <1560417152-53050-1-git-send-email-tanhuazhong@huawei.com>
From: Shiju Jose <shiju.jose@huawei.com>
This patch adds the recovery for the HNS H/W errors which occurred
before the driver initialization.
Reported-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: Shiju Jose <shiju.jose@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
---
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
index d9863c30..6761d72 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
@@ -3236,6 +3236,7 @@ static bool hclge_reset_err_handle(struct hclge_dev *hdev, bool is_timeout)
dev_info(&hdev->pdev->dev, "Upgrade reset level\n");
hclge_clear_reset_cause(hdev);
+ set_bit(HNAE3_GLOBAL_RESET, &hdev->default_reset_request);
mod_timer(&hdev->reset_timer,
jiffies + HCLGE_RESET_INTERVAL);
@@ -3430,8 +3431,7 @@ static void hclge_reset_timer(struct timer_list *t)
struct hclge_dev *hdev = from_timer(hdev, t, reset_timer);
dev_info(&hdev->pdev->dev,
- "triggering global reset in reset timer\n");
- set_bit(HNAE3_GLOBAL_RESET, &hdev->default_reset_request);
+ "triggering reset in reset timer\n");
hclge_reset_event(hdev->pdev, NULL);
}
@@ -8614,6 +8614,18 @@ static int hclge_init_ae_dev(struct hnae3_ae_dev *ae_dev)
/* Log and clear the hw errors those already occurred */
hclge_handle_all_hns_hw_errors(ae_dev);
+ /* request delayed reset for the error recovery because an immediate
+ * global reset on a PF affecting pending initialization of other PFs
+ */
+ if (ae_dev->hw_err_reset_req) {
+ enum hnae3_reset_type reset_level;
+
+ reset_level = hclge_get_reset_level(ae_dev,
+ &ae_dev->hw_err_reset_req);
+ hclge_set_def_reset_request(ae_dev, reset_level);
+ mod_timer(&hdev->reset_timer, jiffies + HCLGE_RESET_INTERVAL);
+ }
+
/* Enable MISC vector(vector0) */
hclge_enable_vector(&hdev->misc_vector, true);
--
2.7.4
next prev parent reply other threads:[~2019-06-13 15:49 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-13 9:12 [PATCH net-next 00/12] net: hns3: some code optimizations & cleanups & bugfixes Huazhong Tan
2019-06-13 9:12 ` [PATCH net-next 01/12] net: hns3: delay setting of reset level for hw errors until slot_reset is called Huazhong Tan
2019-06-13 9:12 ` [PATCH net-next 02/12] net: hns3: fix avoid unnecessary resetting for the H/W errors which do not require reset Huazhong Tan
2019-06-13 9:12 ` [PATCH net-next 03/12] net: hns3: process H/W errors occurred before HNS dev initialization Huazhong Tan
2019-06-13 9:12 ` Huazhong Tan [this message]
2019-06-13 9:12 ` [PATCH net-next 05/12] net: hns3: some changes of MSI-X bits in PPU(RCB) Huazhong Tan
2019-06-13 9:12 ` [PATCH net-next 06/12] net: hns3: extract handling of mpf/pf msi-x errors into functions Huazhong Tan
2019-06-13 9:12 ` [PATCH net-next 07/12] net: hns3: clear restting state when initializing HW device Huazhong Tan
2019-06-13 9:12 ` [PATCH net-next 08/12] net: hns3: free irq when exit from abnormal branch Huazhong Tan
2019-06-13 9:12 ` [PATCH net-next 09/12] net: hns3: fix for dereferencing before null checking Huazhong Tan
2019-06-13 9:12 ` [PATCH net-next 10/12] net: hns3: fix for skb leak when doing selftest Huazhong Tan
2019-06-13 9:12 ` [PATCH net-next 11/12] net: hns3: delay ring buffer clearing during reset Huazhong Tan
2019-06-13 9:12 ` [PATCH net-next 12/12] net: hns3: some variable modification Huazhong Tan
2019-06-15 2:26 ` [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=1560417152-53050-5-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=shiju.jose@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).