提交 61d05ad3 编写于 作者: H Huazhong Tan 提交者: Xie XiuQi

net: hns3: supplement reset error handling

driver inclusion
category: bugfix
bugzilla: NA
CVE: NA

When reset fails, the driver should keep its handshake status with
the hardware, otherwise the hardware will wait for this failing
driver and do nothing anymore.

Also, this patch deals with the continuous IMP reset case.

Feature or Bugfix:Bugfix
Signed-off-by: NHuazhong Tan <tanhuazhong@huawei.com>
Reviewed-by: Nlipeng <lipeng321@huawei.com>
Reviewed-by: NYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 c78a444c
...@@ -3337,7 +3337,7 @@ static bool hclge_reset_err_handle(struct hclge_dev *hdev, bool is_timeout) ...@@ -3337,7 +3337,7 @@ static bool hclge_reset_err_handle(struct hclge_dev *hdev, bool is_timeout)
} else if (hdev->reset_fail_cnt < HCLGE_RESET_MAX_FAIL_CNT) { } else if (hdev->reset_fail_cnt < HCLGE_RESET_MAX_FAIL_CNT) {
hdev->reset_fail_cnt++; hdev->reset_fail_cnt++;
if (is_timeout) { if (hdev->reset_type == HNAE3_IMP_RESET || is_timeout) {
set_bit(hdev->reset_type, &hdev->reset_pending); set_bit(hdev->reset_type, &hdev->reset_pending);
dev_info(&hdev->pdev->dev, dev_info(&hdev->pdev->dev,
"re-schedule to wait for hw reset done\n"); "re-schedule to wait for hw reset done\n");
...@@ -3354,6 +3354,8 @@ static bool hclge_reset_err_handle(struct hclge_dev *hdev, bool is_timeout) ...@@ -3354,6 +3354,8 @@ static bool hclge_reset_err_handle(struct hclge_dev *hdev, bool is_timeout)
} }
hclge_clear_reset_cause(hdev); hclge_clear_reset_cause(hdev);
hclge_write_dev(&hdev->hw, HCLGE_NIC_CSQ_DEPTH_REG,
HCLGE_NIC_CMQ_ENABLE);
if (handle && handle->ae_algo->ops->reset_done) if (handle && handle->ae_algo->ops->reset_done)
handle->ae_algo->ops->reset_done(handle, false); handle->ae_algo->ops->reset_done(handle, false);
......
...@@ -1480,6 +1480,9 @@ static void hclgevf_reset_err_handle(struct hclgevf_dev *hdev) ...@@ -1480,6 +1480,9 @@ static void hclgevf_reset_err_handle(struct hclgevf_dev *hdev)
if (hclgevf_is_reset_pending(hdev)) { if (hclgevf_is_reset_pending(hdev)) {
set_bit(HCLGEVF_RESET_PENDING, &hdev->reset_state); set_bit(HCLGEVF_RESET_PENDING, &hdev->reset_state);
hclgevf_reset_task_schedule(hdev); hclgevf_reset_task_schedule(hdev);
} else {
hclgevf_write_dev(&hdev->hw, HCLGEVF_NIC_CSQ_DEPTH_REG,
HCLGEVF_NIC_CMQ_ENABLE);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册