From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0CEFD42FC1; Thu, 3 Aug 2023 09:52:26 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0627043282; Thu, 3 Aug 2023 09:51:40 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id DBF2543258 for ; Thu, 3 Aug 2023 09:51:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1691049098; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vH23Cz5Uop2SIo/i0v78PsTKm5h90Of+YZj5THlsSMs=; b=O/hSE+lregqQZasy3hg0L5raEvSAB2OKSToKtxrpy14wGNk2RFzLJqAob+of74m1sQT2QH qnWPsKST05yUh4JLd9K/AdVmYSucxFPowgUEta5XIFeqvu89m0jeY1B0OLUXJTKuXlZ4zk TVf6A8qE7ZtlwsRHIlmB/rAvuiKxdSg= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-227-h4ISvyCoNSiQ2pC3i6vYVw-1; Thu, 03 Aug 2023 03:51:33 -0400 X-MC-Unique: h4ISvyCoNSiQ2pC3i6vYVw-1 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C97F2856F67; Thu, 3 Aug 2023 07:51:32 +0000 (UTC) Received: from dmarchan.redhat.com (unknown [10.45.224.120]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7DEA04021B9; Thu, 3 Aug 2023 07:51:31 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: thomas@monjalon.net, ferruh.yigit@amd.com, chenbo.xia@intel.com, nipun.gupta@amd.com, Timothy McDaniel , Gaetan Rivet Subject: [PATCH 13/14] pci: define some AER constants Date: Thu, 3 Aug 2023 09:50:36 +0200 Message-ID: <20230803075038.307012-14-david.marchand@redhat.com> In-Reply-To: <20230803075038.307012-1-david.marchand@redhat.com> References: <20230803075038.307012-1-david.marchand@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII"; x-default=true X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Define some Advanced Error Reporting constants and use them in existing drivers. Signed-off-by: David Marchand --- drivers/event/dlb2/pf/dlb2_main.c | 10 +++------- lib/pci/rte_pci.h | 5 +++++ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/event/dlb2/pf/dlb2_main.c b/drivers/event/dlb2/pf/dlb2_main.c index 187a356c24..aa03e4c311 100644 --- a/drivers/event/dlb2/pf/dlb2_main.c +++ b/drivers/event/dlb2/pf/dlb2_main.c @@ -27,10 +27,6 @@ #define NO_OWNER_VF 0 /* PF ONLY! */ #define NOT_VF_REQ false /* PF ONLY! */ -#define DLB2_PCI_ERR_ROOT_STATUS 0x30 -#define DLB2_PCI_ERR_COR_STATUS 0x10 -#define DLB2_PCI_ERR_UNCOR_STATUS 0x4 - static int dlb2_pf_init_driver_state(struct dlb2_dev *dlb2_dev) { @@ -399,7 +395,7 @@ dlb2_pf_reset(struct dlb2_dev *dlb2_dev) if (err_cap_offset >= 0) { uint32_t tmp; - off = err_cap_offset + DLB2_PCI_ERR_ROOT_STATUS; + off = err_cap_offset + RTE_PCI_ERR_ROOT_STATUS; if (rte_pci_read_config(pdev, &tmp, 4, off) != 4) tmp = 0; @@ -410,7 +406,7 @@ dlb2_pf_reset(struct dlb2_dev *dlb2_dev) return ret; } - off = err_cap_offset + DLB2_PCI_ERR_COR_STATUS; + off = err_cap_offset + RTE_PCI_ERR_COR_STATUS; if (rte_pci_read_config(pdev, &tmp, 4, off) != 4) tmp = 0; @@ -421,7 +417,7 @@ dlb2_pf_reset(struct dlb2_dev *dlb2_dev) return ret; } - off = err_cap_offset + DLB2_PCI_ERR_UNCOR_STATUS; + off = err_cap_offset + RTE_PCI_ERR_UNCOR_STATUS; if (rte_pci_read_config(pdev, &tmp, 4, off) != 4) tmp = 0; diff --git a/lib/pci/rte_pci.h b/lib/pci/rte_pci.h index 0dc8733e1d..c7552a53eb 100644 --- a/lib/pci/rte_pci.h +++ b/lib/pci/rte_pci.h @@ -100,6 +100,11 @@ extern "C" { #define RTE_PCI_EXT_CAP_ID_SRIOV 0x10 /* SR-IOV*/ #define RTE_PCI_EXT_CAP_ID_PRI 0x13 /* Page Request Interface */ +/* Advanced Error Reporting */ +#define RTE_PCI_ERR_UNCOR_STATUS 0x04 /* Uncorrectable Error Status */ +#define RTE_PCI_ERR_COR_STATUS 0x10 /* Correctable Error Status */ +#define RTE_PCI_ERR_ROOT_STATUS 0x30 + /* Access Control Service */ #define RTE_PCI_ACS_CAP 0x04 /* ACS Capability Register */ #define RTE_PCI_ACS_CTRL 0x06 /* ACS Control Register */ -- 2.41.0