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 7C81D43FC9; Tue, 7 May 2024 14:46:00 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 756A142FA9; Tue, 7 May 2024 14:44:36 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2063.outbound.protection.outlook.com [40.107.237.63]) by mails.dpdk.org (Postfix) with ESMTP id 209E1433FB for ; Tue, 7 May 2024 14:44:35 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jwluKCDjyQu+3pr9ZG6P+6QiGQyE+NMPUqqtIe9jk7kxTqTifx/Cd42Yto+6TNzQaOrBq5RUhyk7i5GRypWWs0PexdXxbgui4eFmm4LONb7/v1lK4r5Q1CFTP6R82MEp6BwiP0w3KmGCJtTVhv6jNQTx/s3TQgFp0NCOhps2c/5egXAm69Fl7TS1NRIp9Xv54IcRChG8yEUaEzVmV+oC6Fiq0AyipDVHyImMLBMDMRBbehs/On1Mza9d9HmnTKj4Qs7GlqYQiIO1H/GZ2DnMcVhH9suM+Y+ssNDnc6RLChLPForop4fLZy62xbaz7WUyrvzzBeQXjCRSe6KInwRSyw== 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=8Rwk3KYCCmusVcF4itrRs0kXBwm3rAH7tatDu+7uqs8=; b=fXfQadVqjsb46giKVIUKTVBhP2/h11bgjmmlXY+lzMaAo25fUf7yTjHUlRFL6f/Y+k5H73qq4X+Ef4Cmkk0KoSstg7Tv9NMdEcWbxQw/NwpzJ2oh3qAIfiYKkE/KJXjTp+YODaWb9gEaxgoCN/Re67J3hU1jGBToCRSlFGSTSfkp9Ae0cUNN89hA9+aEEtnGwz6Buxu4We7AfSjirgV4n5SVpQ8jnVGEBpy/j4Wria3Oafe4JYYjGzKMqgh8vcuaRtF6s71wsE0u08D9/N0Yq1kY5DHNQzleio9OesZjeBz99bcQoOTlTdzYW2iDoZJJDi/p9Pa7tYMwZEPrLoljUw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=dpdk.org smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) 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=8Rwk3KYCCmusVcF4itrRs0kXBwm3rAH7tatDu+7uqs8=; b=cP5yPUW4lbF+dnVMQNNXDmj7ZNxndl27Edj0EfFs9SPpOps0G9w9yEiT1NmJ8JUnG214W8LFuUJ4jFxAp0BZjiWESijjjzdMzsPr8bnGAYQRT7ebwNULfjSnxn966ij7RoU5SXy6ADha57RFhoq2x0GCilF2X8nUWGEsRvt0/M8= Received: from PR2P264CA0014.FRAP264.PROD.OUTLOOK.COM (2603:10a6:101::26) by DM4PR12MB8474.namprd12.prod.outlook.com (2603:10b6:8:181::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.42; Tue, 7 May 2024 12:44:30 +0000 Received: from SN1PEPF00036F42.namprd05.prod.outlook.com (2603:10a6:101:0:cafe::1a) by PR2P264CA0014.outlook.office365.com (2603:10a6:101::26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.41 via Frontend Transport; Tue, 7 May 2024 12:44:29 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by SN1PEPF00036F42.mail.protection.outlook.com (10.167.248.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7544.18 via Frontend Transport; Tue, 7 May 2024 12:44:28 +0000 Received: from cae-Lilac-RMB.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 7 May 2024 07:44:21 -0500 From: Venkat Kumar Ande To: CC: , Venkat Kumar Ande Subject: [PATCH v2 20/25] net/axgbe: replace mii generic macro for c45 with AXGBE Date: Tue, 7 May 2024 18:13:00 +0530 Message-ID: <20240507124305.2318-20-venkatkumar.ande@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240507124305.2318-1-venkatkumar.ande@amd.com> References: <20240412125013.10498-1-VenkatKumar.Ande@amd.com> <20240507124305.2318-1-venkatkumar.ande@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SN1PEPF00036F42:EE_|DM4PR12MB8474:EE_ X-MS-Office365-Filtering-Correlation-Id: ef22d661-76c9-4eff-f89c-08dc6e936f80 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230031|1800799015|36860700004|82310400017|376005; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?qZHalazcQKIWKp/ufC95WnFj2XagLuQkp+OogipIpigHyxopILTPnahAQyy5?= =?us-ascii?Q?lS1SgvB35O9lMcDCdw2E0Q8UEyNGeP1S8E8Tk7o0FX2jCyiEDonECJ/457KC?= =?us-ascii?Q?+TwHsqrqtcM3lL/8V5csMuzFeSvwPZwVulEZWEM2dD7MUht4Cgxf3DV5CwvN?= =?us-ascii?Q?Vr1WvyQ9xVNXPygXtSovG+pFf7RJnxsiqXkirQ5NC9DlCKWh3szURW6MOl81?= =?us-ascii?Q?7cBlS2m0pm4ZhcmylkQYwpZAflDbVwuCKAZwn3b1OoDldDuQlcPCEUK5bg+Z?= =?us-ascii?Q?8qSV9qPcm327Ky0eo8I3De8ZlQl530+Lf8KAku8gyLcuhSOPOkJkH8s8zJLr?= =?us-ascii?Q?EhTiQleJj4znko4JtPlpV5l1/ZeKPIIQOCGgYr44h+IRMI7mHdN7HrnVLXf+?= =?us-ascii?Q?LttnIE+TPWqGGfRAYKemWmQO42PlOrplTSmtIYkS4q3rveFXAOTWBQORlkD+?= =?us-ascii?Q?9/YNA+13oUcwL7bV1l6C2OMvMzxbzV1pH7E6930t3yj/qV3yRS68pvzLGw9Z?= =?us-ascii?Q?tYKmgF6LMPw60WTBBlnm6hZMzA+KQpZEr3JTypJySA//6oWmhoXrCMLG7uT7?= =?us-ascii?Q?OYBcNRN4O22DG1W7M9T6jgssyxvQ+Lp41Wlr1bUIQBXQUkPE2NaH5HwrILHB?= =?us-ascii?Q?eoXZ9VJl92tbL/ge7M/lIA8cv3XsP4fpyMKEqM+VzDrFzBhOnNiQFpmpQrAO?= =?us-ascii?Q?lbUyvndQ3UQZKoBYO2bx0JCe9mfIMar0krAczr+GG/5Zar9zbHxCpGtDGLuo?= =?us-ascii?Q?0EBgEE7l2nznA4qbZpgb3MNMgvjBJOQEGzuMCo+Ny2YsE8N57SZjIpbgaNNe?= =?us-ascii?Q?E4XEf5O84gDyQUUwZ6bMn0+KpkgWhJnK96OilrTUZ4kY/K8WYiEyFeDJKY8O?= =?us-ascii?Q?IqXJGLFUYYdQ9FovMXrZDD3HowTTYBJnudM3HEI8zYcML3fI5TTxWiLXxaSs?= =?us-ascii?Q?ek1tEKIdtL6UsTyOD7fAb6DBX2PbnXzpKwwEGwhQwICSaW1wdeCm6XNsRRL2?= =?us-ascii?Q?VUrJFtLZWSgh094zuMB/1h21fXf/i3CzMvcMHmTbRFHVM/YzncNQxnw2lacC?= =?us-ascii?Q?25KjzZp1migMSeLMVCinGZGv8flXZ/aFMu3s1rh+iToYSsbzPeWZ+XORiZs6?= =?us-ascii?Q?rHqGrGNHheAlegavqOTKK5K/qH+GrjS3guD2YMWDapfGYKJ6AsmKHxoIi05t?= =?us-ascii?Q?kZDi972Ccn8ZUyJea7vBvXbHXPln29fbYOVP7kx3Mc53tMrvc4qqbcUojO/x?= =?us-ascii?Q?Utsh/NP6bEml1DX1ZY2RRWijr4q4MH5xetTTYqCclbt1WwBL3fhz+uFq9HSe?= =?us-ascii?Q?C6wjqwdFXqp645Vo/Qwz6EdxXDWSzz/lJYKUmn0TYDnhfplyLqKXmuZa2Bri?= =?us-ascii?Q?tDKItUnfQT8YpISkNkOxzcrdPVTR?= X-Forefront-Antispam-Report: CIP:165.204.84.17; CTRY:US; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:SATLEXMB04.amd.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230031)(1800799015)(36860700004)(82310400017)(376005); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 May 2024 12:44:28.9113 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ef22d661-76c9-4eff-f89c-08dc6e936f80 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d; Ip=[165.204.84.17]; Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: SN1PEPF00036F42.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB8474 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 The axgbe driver reuses MII_ADDR_C45 for its own purpose. The values derived with it are never passed to phylib or a linux MDIO bus driver. In order that MII_ADDR_C45 can be removed, add an AXGBE specific Signed-off-by: Venkat Kumar Ande --- drivers/net/axgbe/axgbe_common.h | 4 ++-- drivers/net/axgbe/axgbe_dev.c | 8 ++++---- drivers/net/axgbe/axgbe_phy.h | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/net/axgbe/axgbe_common.h b/drivers/net/axgbe/axgbe_common.h index 51532fb34a..1a43192630 100644 --- a/drivers/net/axgbe/axgbe_common.h +++ b/drivers/net/axgbe/axgbe_common.h @@ -1732,14 +1732,14 @@ do { \ */ #define XMDIO_READ(_pdata, _mmd, _reg) \ ((_pdata)->hw_if.read_mmd_regs((_pdata), 0, \ - MII_ADDR_C45 | ((_mmd) << 16) | ((_reg) & 0xffff))) + AXGBE_ADDR_C45 | ((_mmd) << 16) | ((_reg) & 0xffff))) #define XMDIO_READ_BITS(_pdata, _mmd, _reg, _mask) \ (XMDIO_READ((_pdata), _mmd, _reg) & _mask) #define XMDIO_WRITE(_pdata, _mmd, _reg, _val) \ ((_pdata)->hw_if.write_mmd_regs((_pdata), 0, \ - MII_ADDR_C45 | ((_mmd) << 16) | ((_reg) & 0xffff), (_val))) + AXGBE_ADDR_C45 | ((_mmd) << 16) | ((_reg) & 0xffff), (_val))) #define XMDIO_WRITE_BITS(_pdata, _mmd, _reg, _mask, _val) \ do { \ diff --git a/drivers/net/axgbe/axgbe_dev.c b/drivers/net/axgbe/axgbe_dev.c index fa7324efa7..ebe64295aa 100644 --- a/drivers/net/axgbe/axgbe_dev.c +++ b/drivers/net/axgbe/axgbe_dev.c @@ -207,8 +207,8 @@ static int axgbe_read_mmd_regs_v2(struct axgbe_port *pdata, unsigned int mmd_address, index, offset; int mmd_data; - if (mmd_reg & MII_ADDR_C45) - mmd_address = mmd_reg & ~MII_ADDR_C45; + if (mmd_reg & AXGBE_ADDR_C45) + mmd_address = mmd_reg & ~AXGBE_ADDR_C45; else mmd_address = (pdata->mdio_mmd << 16) | (mmd_reg & 0xffff); @@ -241,8 +241,8 @@ static void axgbe_write_mmd_regs_v2(struct axgbe_port *pdata, { unsigned int mmd_address, index, offset; - if (mmd_reg & MII_ADDR_C45) - mmd_address = mmd_reg & ~MII_ADDR_C45; + if (mmd_reg & AXGBE_ADDR_C45) + mmd_address = mmd_reg & ~AXGBE_ADDR_C45; else mmd_address = (pdata->mdio_mmd << 16) | (mmd_reg & 0xffff); diff --git a/drivers/net/axgbe/axgbe_phy.h b/drivers/net/axgbe/axgbe_phy.h index 5b844e81cd..eee3afc370 100644 --- a/drivers/net/axgbe/axgbe_phy.h +++ b/drivers/net/axgbe/axgbe_phy.h @@ -16,7 +16,7 @@ /* Or MII_ADDR_C45 into regnum for read/write on mii_bus to enable the 21 bit * IEEE 802.3ae clause 45 addressing mode used by 10GIGE phy chips. */ -#define MII_ADDR_C45 (1 << 30) +#define AXGBE_ADDR_C45 (1 << 30) /* Basic mode status register. */ #define BMSR_LSTATUS 0x0004 /* Link status */ -- 2.34.1