Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp725237pxk; Thu, 24 Sep 2020 17:32:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwzMdr6pgCV2U+eEPecJr3yY+aQGYB/C5CCFlk0ZeJqrPp9Hh6M3am3NtHxC4jtdRleR8RJ X-Received: by 2002:a05:6402:1593:: with SMTP id c19mr1378179edv.33.1600993974239; Thu, 24 Sep 2020 17:32:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600993974; cv=none; d=google.com; s=arc-20160816; b=pLELjqzpLWpMEZ99GJcXcIZtAd484vLJ7CJqtitmQwV60OUZW1ari7sYUlAxZndUK/ EKLTj7St52mgSBDRqmKColHBnlfsxOFz93udvneim+LfgbfxPfrkz21voC29RbAh+uC4 kMq9AI2n54ow+gjZmDfhM5krCCIKdr3YZQtjpGbcSn9zSEL8JXAFQCL8VCS0fWULkw5R Uf0H6sokwDDNreMc2tdq4fvyRmC4thGoEAk+iYKW3r0RyfX/e4gTPzjUv/jUO/20NT4J gH8xwYMHXjVls8yqAXTd4C/9sAAAb5IJsLoI0MGyPTjPSOkKzTcWh0pShvmt2vuTJnjx vS+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=r3FjDjCEWIepMIUy41IZDbBVXzpJj5gxyWPfemAHzMA=; b=KI1Kwl234FHbdNfjpCIIYglGzSmYuFp38iPGD1Vy68nnpaVGc7sgLWYjiywUjyEELh L+hOfb0Oy/u+6FHXmC1JspFgokiJm+EjHEurO3coCUVM8gZ4zcJx0WD2wPT/YFxQT9iv +p8WDXzb7zJT0zUwDKMJK4Rus91uzTDYD+jHrJ/XuSQ30d8fswKdqyl5ZgWvR7pQ/EpY X0p5nMd1bDJ3n6rHnTQjri0VP2XdaqmbRNObfjQU0cee+jVjpE4z9KHHjU8l7yz/zBn1 DHgQevaOsiJ+4dyEp5uKw8dOJD3x8ntZnN1zjjWC6hOJL3vphQMZABb7brsxZRy9FZaI NDEg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a42si935786edf.535.2020.09.24.17.32.30; Thu, 24 Sep 2020 17:32:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727000AbgIYA3S (ORCPT + 99 others); Thu, 24 Sep 2020 20:29:18 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:14230 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726723AbgIYA3G (ORCPT ); Thu, 24 Sep 2020 20:29:06 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id DB363E89807D430A4C36; Fri, 25 Sep 2020 08:29:03 +0800 (CST) Received: from localhost.localdomain (10.69.192.56) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.487.0; Fri, 25 Sep 2020 08:28:53 +0800 From: Huazhong Tan To: CC: , , , , , , Yufeng Mo , Huazhong Tan Subject: [PATCH net-next 3/6] net: hns3: add a hardware error detect type Date: Fri, 25 Sep 2020 08:26:15 +0800 Message-ID: <1600993578-41008-4-git-send-email-tanhuazhong@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1600993578-41008-1-git-send-email-tanhuazhong@huawei.com> References: <1600993578-41008-1-git-send-email-tanhuazhong@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yufeng Mo 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 Signed-off-by: Huazhong Tan --- drivers/net/ethernet/hisilicon/hns3/hnae3.h | 1 + drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 2 ++ drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c | 2 ++ 3 files changed, 5 insertions(+) diff --git a/drivers/net/ethernet/hisilicon/hns3/hnae3.h b/drivers/net/ethernet/hisilicon/hns3/hnae3.h index 088550d..55843ad 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hnae3.h +++ b/drivers/net/ethernet/hisilicon/hns3/hnae3.h @@ -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 { diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c index 0542033..e886700 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c @@ -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, diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c index 50d5ef7..39b7f71 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c @@ -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; -- 2.7.4