From patchwork Fri Dec 7 21:08:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Salil Mehta X-Patchwork-Id: 153204 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp973147ljp; Fri, 7 Dec 2018 13:09:56 -0800 (PST) X-Google-Smtp-Source: AFSGD/XEh0wPCFIO5hoQoB7/tteKJMtg++E9ZsDsnrW/xYlRbSmIgPJdavDYRZWS3c7Gsiy5qYXT X-Received: by 2002:a62:cf02:: with SMTP id b2mr3885444pfg.183.1544216996275; Fri, 07 Dec 2018 13:09:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544216996; cv=none; d=google.com; s=arc-20160816; b=PdzEpb8AZXv1iUfx4tqAcU7qY2MnoKh1KH+O1M1kQIsTwo7Ph2A9VJZ/M59Rxlnztg EPn8O7xzCfrn9QozDsoGw10NusTEevBl4WHHftA5B7/6uOXeyUwv1XA/i8+IpovKppiF XBk/BLWocy6v0r/nGoRpI/UCFyYUbOcpSlaTgrBbxqRuHvCetr4jGaIV6+2mBhQU/WK5 50Z6BwfFTt9WM/biKmYcQAxPvdKw4b/ph/1zcKWrsn+44V1m0Shgqwg9AZo8J1ZjMzdC 0LtRx63hC3Cqm5ueTypZz2BlrEAKUzCYkB/KnLDx9FazuG/EBPmWI14J4AYQSGSE6Kfl Ppng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=iRkGWCHjKmdCXfofzRf8rW56HN8JYMdcL6KYRjAAQYc=; b=LSnnlegHsa0G72xIvs+8/gq/5lk0dA5bpEG0sIb/T4LjZNwUBUOFXTaO6x0w+H39y1 1g33fWqezWzxViWe2JkyrB3vtwgl4BBPzht88RFFhb98eZ1y7UOFCjGwh2XA8dxT2Ru4 g0/+zLzRSL+jbAgznXPM/+hse0G8Kr/jnMOTKh7/q9crtWQcEATlF3Z770BaJZm2Zu3d RWa+aSUwxYPqSm5zS6JxoGLNTbawpDnBpgHrCxjph2qrvE/VvsDqffoPXg02hBCtkimo dL6Jt2KuaBTehHOecBsUn6DtHE7T2RVIok8sOZpgIVS/bK/B9Djy0HipziHCV0JyBPae NEhg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k13si3745333pgb.343.2018.12.07.13.09.56; Fri, 07 Dec 2018 13:09:56 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726377AbeLGVJz (ORCPT + 31 others); Fri, 7 Dec 2018 16:09:55 -0500 Received: from szxga04-in.huawei.com ([45.249.212.190]:16090 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726310AbeLGVJx (ORCPT ); Fri, 7 Dec 2018 16:09:53 -0500 Received: from DGGEMS414-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 9D1E52CD319A5; Sat, 8 Dec 2018 05:09:49 +0800 (CST) Received: from S00293818-DELL1.china.huawei.com (10.202.226.54) by DGGEMS414-HUB.china.huawei.com (10.3.19.214) with Microsoft SMTP Server id 14.3.408.0; Sat, 8 Dec 2018 05:09:42 +0800 From: Salil Mehta To: CC: , , , , , , , Shiju Jose Subject: [PATCH net-next 11/14] net: hns3: handle hw errors of PPP PF Date: Fri, 7 Dec 2018 21:08:08 +0000 Message-ID: <20181207210811.23844-12-salil.mehta@huawei.com> X-Mailer: git-send-email 2.8.3 In-Reply-To: <20181207210811.23844-1-salil.mehta@huawei.com> References: <20181207210811.23844-1-salil.mehta@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.202.226.54] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Shiju Jose This patch handles PF hw errors of PPP(Programmable Packet Processor). Signed-off-by: Shiju Jose Signed-off-by: Salil Mehta --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) -- 2.7.4 diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c index 20f8bb5..e82ef4f 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c @@ -112,8 +112,8 @@ static const struct hclge_hw_error hclge_ppp_mpf_abnormal_int_st1[] = { { /* sentinel */ } }; -static const struct hclge_hw_error hclge_ppp_pf_int[] = { - { .int_msk = BIT(0), .msg = "Tx_vlan_tag_err" }, +static const struct hclge_hw_error hclge_ppp_pf_abnormal_int[] = { + { .int_msk = BIT(0), .msg = "tx_vlan_tag_err" }, { .int_msk = BIT(1), .msg = "rss_list_tc_unassigned_queue_err" }, { /* sentinel */ } }; @@ -385,12 +385,16 @@ static int hclge_config_ppp_error_interrupt(struct hclge_dev *hdev, u32 cmd, cpu_to_le32(HCLGE_PPP_MPF_ECC_ERR_INT0_EN); desc[0].data[1] = cpu_to_le32(HCLGE_PPP_MPF_ECC_ERR_INT1_EN); + desc[0].data[4] = cpu_to_le32(HCLGE_PPP_PF_ERR_INT_EN); } desc[1].data[0] = cpu_to_le32(HCLGE_PPP_MPF_ECC_ERR_INT0_EN_MASK); desc[1].data[1] = cpu_to_le32(HCLGE_PPP_MPF_ECC_ERR_INT1_EN_MASK); + if (hdev->pdev->revision >= 0x21) + desc[1].data[2] = + cpu_to_le32(HCLGE_PPP_PF_ERR_INT_EN_MASK); } else if (cmd == HCLGE_PPP_CMD1_INT_CMD) { if (en) { desc[0].data[0] = @@ -850,6 +854,13 @@ int hclge_handle_hw_msix_error(struct hclge_dev *hdev, goto msi_error; } + /* read and log PPP PF errors */ + desc_data = (__le32 *)&desc[2]; + status = le32_to_cpu(*desc_data); + if (status) + hclge_log_error(dev, "PPP_PF_ABNORMAL_INT_ST0", + &hclge_ppp_pf_abnormal_int[0], status); + /* clear all PF MSIx errors */ hclge_cmd_reuse_desc(&desc[0], false); desc[0].flag |= cpu_to_le16(HCLGE_CMD_FLAG_NEXT);