Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp506998pxb; Tue, 19 Oct 2021 07:23:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz6xOF/4VYz47cJ9q8Z8HOnwv6yiuteA27h3W1bzgqV7FxXAx84fOCkaGsX56vWcd5p2c2d X-Received: by 2002:a17:906:ae14:: with SMTP id le20mr39022893ejb.89.1634653406732; Tue, 19 Oct 2021 07:23:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634653406; cv=none; d=google.com; s=arc-20160816; b=MaJxbVvjLbmhSsvP85YG4PAkEq75p/KTUAa1U6QdyoGoQ6rxjjma878ClICn2KGIcn Or/7ENJ7Q9D7kObEy5Re8uIzzIKommyE/H2sJhYMMPesFJU4CWkBkNiWBL1ym3uVE4Vi 4qf8Ppy2K8kbguQYSRqbmeia5NKGVzWd6WYevo/+fVDitF1VuF1mzpd0Z42TevWtjp8l vEZOvMzR7Xx7L2KKXgAo4iPajr6ClUMDM4GoUgex+Ysoqcm2M3zh8V/2SKN3lMbrqTCw OBzcjofF7LnnFib2I7SVNLYY/HO023eAoEa9iKS7+juTtZ8TlcOdpfw0Cb+wDAU/DTJY omuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=c1sUNu4K4ucHLHmUbOhXuG9/t5xgy8yzgmWapgS/Dgg=; b=u8WEHI1Bt99GDWRBbFwqLXYtWQuGijUEYCWGdBO5rs/ulqvIgSge9b+M51D5H3YbFh MbxPfRgwnCElbRn7cfjprbRIE1X30iArYRbPkyN0xjxs8W21Tib+wY3eMrC0PWJBq06w ptxpfM7CbwNiIijncKHlklludWvXJonHjbg9021uLCPAf/ZJ8W4bo2f4OF+scOwUBxkG ba/qcl5/3NojcwDwq64GjSUhOBWT9NI9xIHmZcrhUQzuzx4y5mBarTqrng1C5PTSgAj7 Ehy0ddHFA5AWznvkm8g06fHNi2rw8c9nTdtjd4jzKUA7TPYL81z20F3phpDKtpNSRXUG waXg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p8si2735554edi.174.2021.10.19.07.23.02; Tue, 19 Oct 2021 07:23:26 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231679AbhJSOXH (ORCPT + 99 others); Tue, 19 Oct 2021 10:23:07 -0400 Received: from szxga03-in.huawei.com ([45.249.212.189]:26167 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229755AbhJSOXG (ORCPT ); Tue, 19 Oct 2021 10:23:06 -0400 Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.55]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4HYbV172zwz8tl6; Tue, 19 Oct 2021 22:19:37 +0800 (CST) Received: from kwepemm600016.china.huawei.com (7.193.23.20) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.15; Tue, 19 Oct 2021 22:20:51 +0800 Received: from localhost.localdomain (10.67.165.24) by kwepemm600016.china.huawei.com (7.193.23.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.15; Tue, 19 Oct 2021 22:20:50 +0800 From: Guangbin Huang To: , CC: , , , , Subject: [PATCH net 1/8] net: hns3: Add configuration of TM QCN error event Date: Tue, 19 Oct 2021 22:16:28 +0800 Message-ID: <20211019141635.43695-2-huangguangbin2@huawei.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211019141635.43695-1-huangguangbin2@huawei.com> References: <20211019141635.43695-1-huangguangbin2@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.67.165.24] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To kwepemm600016.china.huawei.com (7.193.23.20) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jiaran Zhang Add configuration of interrupt type and fifo interrupt enable of TM QCN error event if enabled, otherwise this event will not be reported when there is error. Fixes: d914971df022 ("net: hns3: remove redundant query in hclge_config_tm_hw_err_int()") Signed-off-by: Jiaran Zhang Signed-off-by: Guangbin Huang --- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c | 5 ++++- drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.h | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c index bb9b026ae88e..93aa7f2bdc13 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.c @@ -1560,8 +1560,11 @@ static int hclge_config_tm_hw_err_int(struct hclge_dev *hdev, bool en) /* configure TM QCN hw errors */ hclge_cmd_setup_basic_desc(&desc, HCLGE_TM_QCN_MEM_INT_CFG, false); - if (en) + desc.data[0] = cpu_to_le32(HCLGE_TM_QCN_ERR_INT_TYPE); + if (en) { + desc.data[0] |= cpu_to_le32(HCLGE_TM_QCN_FIFO_INT_EN); desc.data[1] = cpu_to_le32(HCLGE_TM_QCN_MEM_ERR_INT_EN); + } ret = hclge_cmd_send(&hdev->hw, &desc, 1); if (ret) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.h b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.h index 07987fb8332e..d811eeefe2c0 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.h +++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_err.h @@ -50,6 +50,8 @@ #define HCLGE_PPP_MPF_ECC_ERR_INT3_EN 0x003F #define HCLGE_PPP_MPF_ECC_ERR_INT3_EN_MASK 0x003F #define HCLGE_TM_SCH_ECC_ERR_INT_EN 0x3 +#define HCLGE_TM_QCN_ERR_INT_TYPE 0x29 +#define HCLGE_TM_QCN_FIFO_INT_EN 0xFFFF00 #define HCLGE_TM_QCN_MEM_ERR_INT_EN 0xFFFFFF #define HCLGE_NCSI_ERR_INT_EN 0x3 #define HCLGE_NCSI_ERR_INT_TYPE 0x9 -- 2.33.0