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 447BD43FC9; Tue, 7 May 2024 14:44:29 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E74D3433BC; Tue, 7 May 2024 14:43:59 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2089.outbound.protection.outlook.com [40.107.93.89]) by mails.dpdk.org (Postfix) with ESMTP id 2C220433AF; Tue, 7 May 2024 14:43:53 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Z9IwwXGjgCOB1a24lp2/04ASOnN88t0/WEPqAYfTQjsEhqXf5fwMWtRKJUWqg9TWSO+d9npni4XjWudW7654GKEP6H68qCb741DC+u7AzYIctU0K9GOVxA70d92hOQKgJKs7s0PlU/pBNlAKCVzdO6HfU7ptZzAtyTmRLYT+BsknREmeaiM/qABe4ei35OcGj4G8TiZMfvYOlA7LdJ8LzZZYlFa2qjZapiq+/4KQaN4ikVT4U5OHrpnIDXdxwVkdbCGSE5LyNuyXF8abjEbcCipAYOQMUIgWmA47RYRtDoi+NbTdsTPiFU8jPKa2EzwqpafuGPBZ6wuPqGifLsV4jw== 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=8+SZgAUJa2Uf525tv5gmmu+onoygSKwGWRtMmOv9zso=; b=Hgan/BxFWAbyXHgrOmglAhxictZXElamZ5UAHWgdFHoKdhhcPc6QkUjPxrVee2otIhdbytpCVyx/4UI3Iq8ix0gOSyEdNvVLlbsBeuW1G2xFMQsuJHUDzQCyHD4S0+UsHlto7mUKly253p5WdxosMhx+MvQCC4yyldln1+qGfhH0QraGTTm7eaMypZelvlswfj89azzqsgstvcn3yFd3YzTKYONXKF4TiIbS6eGJ5DVycgnqdUJIWkTpKNQZ2axbV6XmQbVMBg4t+/6RKz/M8ioX+0i2rufsXKv3feKCg1rhbCSLotC1WkOLkj/nWgww3j/zEdwsmfaTCmqDLAP7Uw== 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=8+SZgAUJa2Uf525tv5gmmu+onoygSKwGWRtMmOv9zso=; b=uhucuG1r4pNp4Kb2iU5CFP0hc3HWQkGwV3GSBW50M7bwgOo8fyy0L2hDY1m/2T1cXMr/AiFSWCepOQXxXTR6FF9tOeCr/lBW6wnDuuRlwQ5buYinJYix59rpnmRSdBSAhpGOmRz8J5YUAqh3eYUabVwz8tDmJWRun3kdSh3mqJQ= Received: from PH7P220CA0037.NAMP220.PROD.OUTLOOK.COM (2603:10b6:510:32b::18) by IA1PR12MB8080.namprd12.prod.outlook.com (2603:10b6:208:3fd::6) 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:43:50 +0000 Received: from SN1PEPF00036F43.namprd05.prod.outlook.com (2603:10b6:510:32b:cafe::29) by PH7P220CA0037.outlook.office365.com (2603:10b6:510:32b::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.42 via Frontend Transport; Tue, 7 May 2024 12:43:50 +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 SN1PEPF00036F43.mail.protection.outlook.com (10.167.248.27) 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:43:50 +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:43:48 -0500 From: Venkat Kumar Ande To: CC: , Venkat Kumar Ande , Subject: [PATCH v2 07/25] net/axgbe: enable PLL control for fixed PHY modes only Date: Tue, 7 May 2024 18:12:47 +0530 Message-ID: <20240507124305.2318-7-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: SN1PEPF00036F43:EE_|IA1PR12MB8080:EE_ X-MS-Office365-Filtering-Correlation-Id: 287de0ba-583b-4ad7-211c-08dc6e935881 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230031|82310400017|1800799015|376005|36860700004; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?nEjLcN71J0tPsYfoQ9m45cn/f7AEzKzUBa89+rOxgDBRvfRT0zOzDVfUu29f?= =?us-ascii?Q?UgKZiOyNif22nR+UVKGa+x86e/L2YS1bRg0Bb3EwMNVrJ54phUm/aHpDMhY1?= =?us-ascii?Q?nDiPEbeBdplwtwO5KVreAqdLS7qbCYAEc2c3EI/5Udy9CV96F+mUzkqpv22i?= =?us-ascii?Q?Vv7t0hrTfqbXEAFAiCuBPBJ43Z9k2VYdSZBtz3q0FSOVdSPZb1XUYiVxTiEh?= =?us-ascii?Q?vg8mu9iwRZ64v7kgxCOZU3AEqhUlnaBiAkvVULJb473rrJyJbNyjBuqBLiGt?= =?us-ascii?Q?XjBrlcuiYWnSYZwN3urM2CkU/lB+NDPlq42SZKjhbm2F4ayh6wRWmEop0MTh?= =?us-ascii?Q?qjwoNQWR09+tRdBB64xa+rfRwZDbRY7W0ZClUkFISmPEYeZJkhCfBRvSvUj4?= =?us-ascii?Q?fP5SQ7YyRj4QXLg9EkiSOZDAvLgUc8HBJlfI0K9mL/VQj6+4fkUX8VcCLHn+?= =?us-ascii?Q?TpR0MisB+wm7QEnT8kTX10/7+BTL/G8TZe5fdMM9sgghbw333+YOEeTAIEAG?= =?us-ascii?Q?5IBJ4PqMkMDhJWMS/pQmQKP3YXQDMgx8ukiXkTYnDm4AUsPWoup8kbYRCnX2?= =?us-ascii?Q?eaFiq98qNSxtwzgI+cmd24Jx8mxYGPlNH3eBVFH08pRnjBHXQxFVHVTd8Ruu?= =?us-ascii?Q?nzX/dm4rvLu2ZR15C7f5oqY2QMamVuubHcExlr3sX3FKhuWBWMBsrVsapIHl?= =?us-ascii?Q?Su8QAm298+hfQlp8nxWMiGGT/HEpzHVghNjdi1jIwGXYecgOEh9oBJ8J729m?= =?us-ascii?Q?Jz7o/ZnNkUivdNOb4p2FloYnABin+a6X/sH9QfTZY+tH3yPf7U/tTrr6MYBE?= =?us-ascii?Q?orQ1QA4y7dEbJxDjPWhmMGqTvMBULKFtkfhTQm2wsgOqortNoS5xC3Q+c7ex?= =?us-ascii?Q?p2tFS1zicP9hvedT92LgiJWBFu8s39zUUSJGUAnHZ4/uiZElYfQeRVzAdNM1?= =?us-ascii?Q?0C49E79ycNhNxgUefQdKX2+ye2BZm+YMGYL73vBou+RE3RdMZ0exab3Flomf?= =?us-ascii?Q?f6UhfOs2cL7qrLa1X7p9TQcHyg7a8Z8WLRHKRtS2Mfd1c1dztC/FnmEmA95c?= =?us-ascii?Q?/2/eJQI8+POB5iPNkt8XK4rD+WmvYMIarhF6JzXuh4B09WPOVYN1cMUzqDUW?= =?us-ascii?Q?fR4mJo4aU2Wv5XftD0HsD94B+uwyrHOoNpZbo9u1YdlPt04PsZkI2DkdcMxo?= =?us-ascii?Q?8RkyWRUqBYxM434vOAs9VOrE52w09lLBfrJOye9eq+ihzMlGWGQ+2rYoWxVb?= =?us-ascii?Q?mMWii0Mq3AcO4suzJHCFAFGjUMA/jES1SUPQ+jMpgTZpGGO6jNuBvVnrxrWV?= =?us-ascii?Q?A1VFFB+bwjiS0ADRNtpVtouHhGOw1RiEPE+bBJGalA4hYs1cbV8MIOc4ipJu?= =?us-ascii?Q?OAP9AZiWah/v/mH7TsusQcZ4ikgq?= 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)(82310400017)(1800799015)(376005)(36860700004); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 May 2024 12:43:50.3248 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 287de0ba-583b-4ad7-211c-08dc6e935881 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: SN1PEPF00036F43.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB8080 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 PLL control setting(RRC) is needed only in fixed PHY configuration to fix the peer-peer issues. Without the PLL control setting, the link up takes longer time in a fixed phy configuration. Without the fix the user will not get the link come UP. Driver implements SW RRC for Autoneg On configuration, hence PLL control setting (RRC) is not needed for AN On configuration, and can be skipped. Also, PLL re-initialization is not needed for PHY Power Off and RRC commands. Otherwise, they lead to mailbox errors. Added the changes accordingly. Fixes: 09b0a36cc7ae ("net/axgbe: toggle PLL settings during rate change") Cc: stable@dpdk.org Signed-off-by: Venkat Kumar Ande --- drivers/net/axgbe/axgbe_phy_impl.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe/axgbe_phy_impl.c index f51830f800..9c2ae7bba0 100644 --- a/drivers/net/axgbe/axgbe_phy_impl.c +++ b/drivers/net/axgbe/axgbe_phy_impl.c @@ -1228,6 +1228,10 @@ static void axgbe_phy_rx_reset(struct axgbe_port *pdata) static void axgbe_phy_pll_ctrl(struct axgbe_port *pdata, bool enable) { + /* PLL_CTRL feature needs to be enabled for fixed PHY modes (Non-Autoneg) only */ + if (pdata->phy.autoneg != AUTONEG_DISABLE) + return; + XMDIO_WRITE_BITS(pdata, MDIO_MMD_PMAPMD, MDIO_VEND2_PMA_MISC_CTRL0, XGBE_PMA_PLL_CTRL_MASK, enable ? XGBE_PMA_PLL_CTRL_SET @@ -1272,8 +1276,10 @@ static void axgbe_phy_perform_ratechange(struct axgbe_port *pdata, axgbe_phy_rx_reset(pdata); reenable_pll: - /* Re-enable the PLL control */ - axgbe_phy_pll_ctrl(pdata, true); + /* Enable PLL re-initialization, not needed for PHY Power Off and RRC cmds */ + if (cmd != AXGBE_MB_CMD_POWER_OFF && + cmd != AXGBE_MB_CMD_RRC) + axgbe_phy_pll_ctrl(pdata, true); PMD_DRV_LOG(NOTICE, "firmware mailbox command did not complete\n"); } -- 2.34.1