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 19E6CA0353; Mon, 31 Jan 2022 07:48:21 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9606440F35; Mon, 31 Jan 2022 07:48:20 +0100 (CET) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2076.outbound.protection.outlook.com [40.107.244.76]) by mails.dpdk.org (Postfix) with ESMTP id CFEF440E25 for ; Mon, 31 Jan 2022 07:48:19 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZUrNXzk71I4/Cx7Rb6uNvpf4NKJlBHDqtfeQZvQTU1P579xjbBI+54Zp4WvPpTr8E+I3JJITZcNYfYFbr87BAikxxCW96IvpRYwzFPk1eRjnyRtMbCUkW//Ds4Us9mTxAocggIexOXewLSGYu8BQKoR5NI2FAElxIYyCzREt1qmppZ//sTXq/Qopfb4hWzz7mRLpXv6Drl6rjh5o1DTmCmsQyHR6NT++rI5HklY/cVfEqaiJyU96+K45paCQmzzXw1Fzt2jK6Zu+Cq5fhxi/wgJhohajYeHBUZpzR/AIpG9DAVebCCvfNyPWR0jEbr+ok1hFsOTP1JuXgBL1czJeag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=NI0rKLNAekhs5JQHCTvDwPX3x7Y+8zi1hm0mJJU/Y+I=; b=W4tDTPllJe6zWxhhDLbfSA5ZuN99jUV4kZ2TBO/Md0h+uHwbA9bOt1vgRZsmezUPTEswBAqMKLvmzBA5TV773ylV5BQAM3fFJWRPgAqsCWiZxd9Qm7KHGaAFIj++k92sB36SlOPThOdSWLgbUC9QNNmwVConWa1VPbb1nVOopZaNJ/xxSvU1WIfc5oCLw4JJBkrrKJmU9PRbsnk3D9WJjHRJJxjlD7IocTFAeAYLmR5AUNmHLcoLic/8L6guWsmSvXH8F0MyKc7v7J/SNoqHw14rSXA8eDO5vmm4YRpyJ9E3Xy2rRLT3ICkmHpGWSpv6TXpZStevkjICxuPfsENMMw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=NI0rKLNAekhs5JQHCTvDwPX3x7Y+8zi1hm0mJJU/Y+I=; b=eUMtHnmNX0WWcql3UmtY3Xho9sc7usFRFkJ7mro/yYBWSFpcgOZqq2/7o157zOS7dz/qnFhxN2iAGwdZL/b54uZV1ITabhSTPDVMpskbfvbvnY/lsgN/qcG1MHgU6OLRB15bFynKgWV4vCzfWnjV0WiwQIaRIgxNfhOUNX/Hz2g= Received: from MW2PR12MB2538.namprd12.prod.outlook.com (2603:10b6:907:5::14) by MWHPR12MB1248.namprd12.prod.outlook.com (2603:10b6:300:12::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4930.18; Mon, 31 Jan 2022 06:48:17 +0000 Received: from MW2PR12MB2538.namprd12.prod.outlook.com ([fe80::ad98:6ba4:7d63:fd6a]) by MW2PR12MB2538.namprd12.prod.outlook.com ([fe80::ad98:6ba4:7d63:fd6a%4]) with mapi id 15.20.4930.021; Mon, 31 Jan 2022 06:48:17 +0000 From: "Namburu, Chandu-babu" To: "Sebastian, Selwin" , "dev@dpdk.org" CC: "ferruh.yigit@intel.com" Subject: RE: [PATCH v1 1/2] net/axgbe: add support for Yellow Carp ethernet device Thread-Topic: [PATCH v1 1/2] net/axgbe: add support for Yellow Carp ethernet device Thread-Index: AQHYFmTyZMx5U0zIOEeP606skqMFE6x8sCVQ Date: Mon, 31 Jan 2022 06:48:17 +0000 Message-ID: References: <20220131053920.167230-1-ssebasti@amd.com> <20220131053920.167230-2-ssebasti@amd.com> In-Reply-To: <20220131053920.167230-2-ssebasti@amd.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_d4243a53-6221-4f75-8154-e4b33a5707a1_Enabled=true; MSIP_Label_d4243a53-6221-4f75-8154-e4b33a5707a1_SetDate=2022-01-31T06:47:53Z; MSIP_Label_d4243a53-6221-4f75-8154-e4b33a5707a1_Method=Privileged; MSIP_Label_d4243a53-6221-4f75-8154-e4b33a5707a1_Name=Public-AIP 2.0; MSIP_Label_d4243a53-6221-4f75-8154-e4b33a5707a1_SiteId=3dd8961f-e488-4e60-8e11-a82d994e183d; MSIP_Label_d4243a53-6221-4f75-8154-e4b33a5707a1_ActionId=318744d7-3d87-4ddf-98b2-af843e16cb1d; MSIP_Label_d4243a53-6221-4f75-8154-e4b33a5707a1_ContentBits=1 msip_label_d4243a53-6221-4f75-8154-e4b33a5707a1_enabled: true msip_label_d4243a53-6221-4f75-8154-e4b33a5707a1_setdate: 2022-01-31T06:48:13Z msip_label_d4243a53-6221-4f75-8154-e4b33a5707a1_method: Privileged msip_label_d4243a53-6221-4f75-8154-e4b33a5707a1_name: Public-AIP 2.0 msip_label_d4243a53-6221-4f75-8154-e4b33a5707a1_siteid: 3dd8961f-e488-4e60-8e11-a82d994e183d msip_label_d4243a53-6221-4f75-8154-e4b33a5707a1_actionid: edd605a1-fdd0-428b-a747-805a753c79fe msip_label_d4243a53-6221-4f75-8154-e4b33a5707a1_contentbits: 0 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ee74001f-f174-4951-469a-08d9e485a98e x-ms-traffictypediagnostic: MWHPR12MB1248:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3513; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: RsZF1OVnbzzCUEiWtRK/FKuYkjf2/DAkfK+0D06c03gDIeHYdfEJIJ8nGM4I2zsvmH/dMtQGLTQWvXEvbgQhdF24cGItyDBBs3cZueWJUHjqwrK0uIC5KC0XFwC7SDIc3L6MFuqwCJgKbR5s+st9AXUL21yVhC/rzjeWmOqUSPVbIdt2V0v13htkEXrovuTlEpj234Q/OcLpen64h+xqyoxbgevp33TOqIH3k9SWvdnqLzDIbHKbn4B6dqXCX5OcPWzqnJnpD1y67i8kPILdtNJWj49nKQmTpcfV9m6hKCrhmJDAkvzflg0PzkVVDdViDZb0IOM0VzQnhfNWVZwdPQO5QuBm6w8RKVxdZAFT706hTA1EVR3WZJFW0RNE/oWPi5RxKYxKScxvmKSG51c7caWjW3nEl5gA40fdE0s8ux7gYmOtPxBlC6beuw4tVkWoAChoz3fOd7te+ZZoqPBVcvll2HkqybaDDOw6jvbx/QnNyQviyGknASxuu62T3chtFwcRSMYkugHpXNvDFhCEw7n3PpX3s6iEMF4waiTSLO6/Cm7atlas4dIMCqQWwG1PCasnMozmn7YIrp3JFbWv3rIY3aaIwZzQkhgHXg5248q94K/oEBIdtb/JQjRO2DtnUFYkehIyjqo0H/nGFlbx8qc74qzRFbvKM4VCBOPP6Ygvm57z5IsvLOvOvTbeg6ng0i2mV/6MEmKDOuVs81IvBw== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW2PR12MB2538.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(5660300002)(122000001)(52536014)(26005)(186003)(53546011)(9686003)(508600001)(38070700005)(6506007)(7696005)(71200400001)(76116006)(8936002)(8676002)(4326008)(66556008)(66946007)(66476007)(66446008)(64756008)(110136005)(86362001)(83380400001)(38100700002)(55016003)(33656002)(2906002)(316002)(20210929001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?ZgKzvhqom3xAHFODyHQf+5aI0780l4f1v24kB6T0MKlx06pZNBxocaS+lpz4?= =?us-ascii?Q?/1t4tXSG09Oi5yD2Rz4g76mnYHnMei29h8FsLnRytOqzK0g/jec0Vx+iLVCi?= =?us-ascii?Q?Hy3Ec1POTntJnS5DWAG17mLbwSQjJYStNfaFk1TNoVaFBbjv2Rxum27/TDrc?= =?us-ascii?Q?GcaFZLybxvqJAbQbLp7NZbyLgLcBaHTZhtRXXWa61Dkqp57nIN8UfgL+UsCL?= =?us-ascii?Q?p7wqjCPjY2+nci6n25oZkU95ajjCsocHZAKWiOwMpsV56OW8/Hpce/wTeSeM?= =?us-ascii?Q?/YHBausODdx0yLragGfVEshxduR8sj6wkcdytYfZs3CTj2hUUH0AnHtsJWKp?= =?us-ascii?Q?GI6pwf0MUHMfK9muIRD9tDPDvNhNta2HNrF9jNDlNSiR+Ak0+5HKr6WVl7h5?= =?us-ascii?Q?4Ei1vGeE8WMKc1qKKmGvH0i0713ktnDRSbiy9XrY1j2vgxz4WEVtxCvkXVaZ?= =?us-ascii?Q?aJxBSa/+0XVbh74XzvM/snVQZLAJvcAB/C7JlXpe5x6nXDAopCN18hnmrWe5?= =?us-ascii?Q?JODYB+R/Sz1cgeYR7eKs7BZZg67O65Mv3oKhqwPsFV5cckgmc/fDu2n66f7P?= =?us-ascii?Q?ki3NCBaZcjBBVrEA0DA6x++xEYm1VBfJV3bNfur6w/0stT/0CC20b0AwEEfG?= =?us-ascii?Q?+pYK7u3ZllCJfZJPZ2ESN1xIawry9oAoaKtCZNGuL06+JyXBTn4/qgDKFBqF?= =?us-ascii?Q?8NfV/ePZc3vboNWV0qgc5Z4up7g9GeosrCaLEt0hWNYlspex4xmseTq2Kpqg?= =?us-ascii?Q?kuorcZd+pvIdRfPdDtg+ylPAv+Jk4mR2mGHWRbS5UDVhyo5c2/E80TDH4qVJ?= =?us-ascii?Q?0QI5r96VYAjRsLH8sqLpvkbr8IphYyKlj6sMb5auEUI9w9k7G/TL1va24s7I?= =?us-ascii?Q?j+X6Z1dfBwdV5ztuGWipKpnpBReMbQflQSqWIbINNJiRZ6WbAH0BW/yts3+6?= =?us-ascii?Q?c3rzCdpxjY231ZzE7xZCWF71Xtx1xGfRK+0ibXn8v46IKf30RtMb91z0HfpH?= =?us-ascii?Q?yzBe1DGsmbK6ITVgAFeVy8Ssa7QThsk48DVTk4JFXICPqLECdvK/s/RTibhY?= =?us-ascii?Q?tY/lb2Xl/fhwdWIcuYDw5ellmc8gckNaKvmAyztvyI1Ds1cqqB6SKcNihWkq?= =?us-ascii?Q?p/3dv/ADf3nsBCaTAFoEFswJTGH7hobbaAG7jtcLnXrlTw62/YO1ZGps3GQ5?= =?us-ascii?Q?N1DRMH8uGofif1z7dOT0+MS0v8brnbgU+MusJhRa9pTuhGISW8YDMQNBqMb4?= =?us-ascii?Q?mjU2PyaU20QHRdVqjsow9WTsd6okoC4gsMYGUhma6Pxhgsmg6sf3GighwglY?= =?us-ascii?Q?+s2DBBEPuFtnF3VWKlXBqTgAtqG/kp1N2HJIpWx8ffhzg8H0eEIRXlavAUaB?= =?us-ascii?Q?YlGsxW4aHGiQWcgD3ULG5hIaRw39til/yhle1mMtEfCVtMBrDABep8+Dj34V?= =?us-ascii?Q?PzXDguK06zUM7M1XFco4DoZdnGHgLNmv3kyudyUqbrlaz4R3zmGuuhCaHWzB?= =?us-ascii?Q?AWWUHuQCT7cu9JagxRMRqWZYB1lhfXrsDr5+fq7t936qQSZo4mEJtQuIuO7Z?= =?us-ascii?Q?abwCv1Yjava6eq00uJ+X4h1oiRnqLAdtvTu0Et8aRLilS06DDh2/PqPYWzXi?= =?us-ascii?Q?///LhaFVhsNfoKaJ7L64V6I=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW2PR12MB2538.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ee74001f-f174-4951-469a-08d9e485a98e X-MS-Exchange-CrossTenant-originalarrivaltime: 31 Jan 2022 06:48:17.3905 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: kd+GZ6C9tUl9YP7xsKixSjcX/MgvTm69hXlG9UFEcx5qKkt4UkX75cdBeF3tP84adf+2uGC4HFjJ8fD3V87mvw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1248 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 [Public] -----Original Message----- From: Sebastian, Selwin =20 Sent: Monday, January 31, 2022 11:09 AM To: dev@dpdk.org Cc: Namburu, Chandu-babu ; ferruh.yigit@intel.com Subject: [PATCH v1 1/2] net/axgbe: add support for Yellow Carp ethernet dev= ice From: Selwin Sebastian Yellow Carp ethernet devices (V3xxx) use the existing PCI ID but the window= settings for the indirect PCS access have been altered. Add the check for = Yellow Carp Ethernet devices to use the new register values. Signed-off-by: Selwin Sebastian --- drivers/net/axgbe/axgbe_common.h | 2 ++ drivers/net/axgbe/axgbe_ethdev.c= | 34 +++++++++++++++++++++----------- 2 files changed, 25 insertions(+), 11 deletions(-) diff --git a/drivers/net/axgbe/axgbe_common.h b/drivers/net/axgbe/axgbe_com= mon.h index 5310ac54f5..b9ebf64fb8 100644 --- a/drivers/net/axgbe/axgbe_common.h +++ b/drivers/net/axgbe/axgbe_common.h @@ -901,6 +901,8 @@ #define PCS_V2_WINDOW_SELECT 0x9064 #define PCS_V2_RV_WINDOW_DEF 0x1060 #define PCS_V2_RV_WINDOW_SELECT 0x1064 +#define PCS_V2_YC_WINDOW_DEF 0x18060 +#define PCS_V2_YC_WINDOW_SELECT 0x18064 =20 /* PCS register entry bit positions and sizes */ #define PCS_V2_WINDOW_DEF_OFFSET_INDEX 6 diff --git a/drivers/net/axgbe/axgbe_ethdev.c b/drivers/net/axgbe/axgbe_eth= dev.c index e9546469f3..2be9387f98 100644 --- a/drivers/net/axgbe/axgbe_ethdev.c +++ b/drivers/net/axgbe/axgbe_ethdev.c @@ -173,6 +173,8 @@ static const struct axgbe_xstats axgbe_xstats_strings[]= =3D { /* The set of PCI devices this driver supports */ #define AMD_PCI_VENDOR_ID 0x1022 #define AMD_PCI_RV_ROOT_COMPLEX_ID 0x15d0 +#define AMD_PCI_YC_ROOT_COMPLEX_ID 0x14b5 +#define AMD_PCI_SNOWY_ROOT_COMPLEX_ID 0x1450 #define AMD_PCI_AXGBE_DEVICE_V2A 0x1458 #define AMD_PCI_AXGBE_DEVICE_V2B = 0x1459 =20 @@ -2178,17 +2180,6 @@ eth_axgbe_dev_init(struct rte_eth_dev *eth_dev) pci_dev =3D RTE_DEV_TO_PCI(eth_dev->device); pdata->pci_dev =3D pci_dev; =20 - /* - * Use root complex device ID to differentiate RV AXGBE vs SNOWY AXGBE - */ - if ((get_pci_rc_devid()) =3D=3D AMD_PCI_RV_ROOT_COMPLEX_ID) { - pdata->xpcs_window_def_reg =3D PCS_V2_RV_WINDOW_DEF; - pdata->xpcs_window_sel_reg =3D PCS_V2_RV_WINDOW_SELECT; - } else { - pdata->xpcs_window_def_reg =3D PCS_V2_WINDOW_DEF; - pdata->xpcs_window_sel_reg =3D PCS_V2_WINDOW_SELECT; - } - pdata->xgmac_regs =3D (void *)pci_dev->mem_resource[AXGBE_AXGMAC_BAR].addr; pdata->xprop_regs =3D (void *)((uint8_t *)pdata->xgmac_regs @@ -2203,6 +2= 194,27 @@ eth_axgbe_dev_init(struct rte_eth_dev *eth_dev) else pdata->vdata =3D &axgbe_v2b; =20 + /* + * Use PCI root complex device ID to identify the CPU + */ + switch (get_pci_rc_devid()) { + case AMD_PCI_RV_ROOT_COMPLEX_ID: + pdata->xpcs_window_def_reg =3D PCS_V2_RV_WINDOW_DEF; + pdata->xpcs_window_sel_reg =3D PCS_V2_RV_WINDOW_SELECT; + break; + case AMD_PCI_YC_ROOT_COMPLEX_ID: + pdata->xpcs_window_def_reg =3D PCS_V2_YC_WINDOW_DEF; + pdata->xpcs_window_sel_reg =3D PCS_V2_YC_WINDOW_SELECT; + break; + case AMD_PCI_SNOWY_ROOT_COMPLEX_ID: + pdata->xpcs_window_def_reg =3D PCS_V2_WINDOW_DEF; + pdata->xpcs_window_sel_reg =3D PCS_V2_WINDOW_SELECT; + break; + default: + PMD_DRV_LOG(ERR, "No supported devices found\n"); + return -ENODEV; + } + /* Configure the PCS indirect addressing support */ reg =3D XPCS32_IOREAD(pdata, pdata->xpcs_window_def_reg); pdata->xpcs_window =3D XPCS_GET_BITS(reg, PCS_V2_WINDOW_DEF, OFFSET); -- 2.25.1 For series, Acked-by: Chandubabu Namburu