]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
net: hns3: add a hardware error detect type
authorYufeng Mo <moyufeng@huawei.com>
Fri, 25 Sep 2020 00:26:15 +0000 (08:26 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 25 Sep 2020 03:19:24 +0000 (20:19 -0700)
In hns3_process_hw_error(), the hardware error detection of the
ROCEE AXI RESP error type is added. When this error occurs,
the client needs to be notified of this error and take
corresponding operation.

Signed-off-by: Yufeng Mo <moyufeng@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hnae3.h
drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c

index 088550db2de78e056255c5eb820f835b788431a2..55843ada384e4e14c3b98cc847d9a8cc91bc859d 100644 (file)
@@ -152,6 +152,7 @@ enum hnae3_hw_error_type {
        HNAE3_PPU_POISON_ERROR,
        HNAE3_CMDQ_ECC_ERROR,
        HNAE3_IMP_RD_POISON_ERROR,
+       HNAE3_ROCEE_AXI_RESP_ERROR,
 };
 
 enum hnae3_reset_type {
index 0542033dce9804a5217a69e7bd8fcb47e1d165da..e886700a1716e6855ff05327645cfab44389cd21 100644 (file)
@@ -4600,6 +4600,8 @@ static const struct hns3_hw_error_info hns3_hw_err[] = {
          .msg = "IMP CMDQ error" },
        { .type = HNAE3_IMP_RD_POISON_ERROR,
          .msg = "IMP RD poison" },
+       { .type = HNAE3_ROCEE_AXI_RESP_ERROR,
+         .msg = "ROCEE AXI RESP error" },
 };
 
 static void hns3_process_hw_error(struct hnae3_handle *handle,
index 50d5ef71756b5388f0c0f4067de375f618413604..39b7f71b32e747b3c24d447bfde648dc4b30caca 100644 (file)
@@ -1507,6 +1507,8 @@ hclge_log_and_clear_rocee_ras_error(struct hclge_dev *hdev)
 
                reset_type = HNAE3_FUNC_RESET;
 
+               hclge_report_hw_error(hdev, HNAE3_ROCEE_AXI_RESP_ERROR);
+
                ret = hclge_log_rocee_axi_error(hdev);
                if (ret)
                        return HNAE3_GLOBAL_RESET;