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 2FE6144153 for ; Tue, 4 Jun 2024 14:12:49 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 24EE2436C1; Tue, 4 Jun 2024 14:12:49 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2087.outbound.protection.outlook.com [40.107.237.87]) by mails.dpdk.org (Postfix) with ESMTP id 149F3436B7; Tue, 4 Jun 2024 14:12:46 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mI4gSUblYu2+wDhjC4cEP9TO21+Ploi0ilez9QNj6w/Gpc/eSpYReflMCzcMWlETGOvoVyRAGTLsbZSJpGjEyfArjFbnO0eago//lTXvSpuoNslWhPLk4AnrUShfBTrp6AMkeuB48g7hXzu6E4UIDTSunkyrWFiJDLAtyNLeNbwLrNXrICWFbGBPpdtgagvhzyENWEmarcvTrORy+I9sAsxRS5qnPL+28IS8wYm2bf9hbJGUgwD9p54x+ZPKX1f2TomlCzMwdWwMc53R3rFIxdM3kvZReq6rxzxXL0Vz9wmay4MpIBPk3W86ENkVZYekAJ4UH+hYJJTG2CdTpmMpwA== 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=megp59XZrLRVj+OwGkiUZDIDIQLMtZVq2mFZGI6e7Cs=; b=bhb4Jrn8MqCXw6Q5P3aGg6/6FBqJRwhEIywoum+z96IbQYyE15m8XNGSJ12BXHBZl5I1IXjuOntp8saZRFJOrGLMZw4fkVs7UoPRMpUA1THYUMLr/lx3kjJRXtZ7rY9hHUxKeTHakPXa9bEHXz6Y4JOtYw2U8rDylUz2Y/n2M9bR1Uf3/6QQgQFsaJq+4liDTZ//JgE8pu5HmAawqFtfHmdLkCx8+K5mfwhGFeMle0odkVUwNMmiJJ/YupNRn4zsPPbTj//yvh2pXGgJ3id6QPf5QAKR2UB6FOlyVbiE3zs2RKXFZDq0fryaBLQt3QlQ7DKTDjKU9IeZnL70IDXMAg== 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=megp59XZrLRVj+OwGkiUZDIDIQLMtZVq2mFZGI6e7Cs=; b=i/UuYEa8d9+XNmS/p4fWwsQtaCYV6g3m2eYKSVHwmQyJ7wQ/hs0M1ye7Fz89yRyox6Yk1KV8SJ6u6Gfeu76onswDAJhoUR9veobrE5CYHuW+wMxfziTrH2RG2Z85uihHsiM0bQdt4qbzXCfHD8BJafYyRouToK6Tfe0WwjiYPa4= Received: from BL1PR13CA0323.namprd13.prod.outlook.com (2603:10b6:208:2c1::28) by LV2PR12MB5725.namprd12.prod.outlook.com (2603:10b6:408:14c::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.17; Tue, 4 Jun 2024 12:12:43 +0000 Received: from BN3PEPF0000B36F.namprd21.prod.outlook.com (2603:10b6:208:2c1:cafe::98) by BL1PR13CA0323.outlook.office365.com (2603:10b6:208:2c1::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7656.14 via Frontend Transport; Tue, 4 Jun 2024 12:12:41 +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 BN3PEPF0000B36F.mail.protection.outlook.com (10.167.243.166) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7677.0 via Frontend Transport; Tue, 4 Jun 2024 12:12:41 +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, 4 Jun 2024 07:12:39 -0500 From: Venkat Kumar Ande To: CC: , Venkat Kumar Ande , , Selwin Sebastian Subject: [PATCH v3 07/25] net/axgbe: enable PLL control for fixed PHY modes only Date: Tue, 4 Jun 2024 17:41:39 +0530 Message-ID: <20240604121157.3052-7-venkatkumar.ande@amd.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240604121157.3052-1-venkatkumar.ande@amd.com> References: <20240507124305.2318-1-VenkatKumar.Ande@amd.com> <20240604121157.3052-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: BN3PEPF0000B36F:EE_|LV2PR12MB5725:EE_ X-MS-Office365-Filtering-Correlation-Id: ad2dcdc6-eaa9-4efe-e0c3-08dc848fa20e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230031|82310400017|36860700004|376005|1800799015; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?NUX3NGGgEJAfISwhgt+U/8N17RofQYwqC4UPKm2s2EF1ip3qzsgr2OAJSYXG?= =?us-ascii?Q?u4/ITmjwT45OKpJ+zHjErHmUovFYf/zYHpkDPJ7JB5pz5VzGKEN9FgjBBZ6R?= =?us-ascii?Q?t25qrcyQDLz/gnv1M2zYVmsbpv0aCOlbAhGxh4mHzxG/HEWetQ2Uc8rJSQxR?= =?us-ascii?Q?QdYQn97V5A5AoU4Rqfyiht5pcGD63F4wfHMllVNNSTQ8dby+O2xtV0QONRkQ?= =?us-ascii?Q?YGaikLO5FB+v3FwUSoHrSbsTxJM5qEVvaB+37HLqGYOP9hmvL/JqGRL6dtNH?= =?us-ascii?Q?6o/5Mm2tRGClRJZwKYzXDi7JLoB1OEuzCDUlwDMdAmq9NKHqKhB39eSUUjYk?= =?us-ascii?Q?rx6kVmn4XT3tyjBirfjYx2AG3hzqQwzf7Lh2n7PT2OO3hgGVR/oOsRKgXiv8?= =?us-ascii?Q?iqz/iUftbiMuTOSZi0GBFGxJ/2NaNaxZ2hHZQhHV1ahBlstAh1oPF8+EDAiM?= =?us-ascii?Q?m0cJpArmQTkOoNniLiiQhOf4bZ5Tl94bqohurkrfffA6yj1YuRae1/KkG2Jk?= =?us-ascii?Q?tWSTayOegJbO5mEOBgoXOtfW+0zjEmnAmihq+eeTBCndhI5bPA6Yo1x//Cfl?= =?us-ascii?Q?H/+dBQ0/BT1yJ4MJYXYXHhFLC9s/XNIeDEJGtsydmVlenGjsDp6zWARaI8Lm?= =?us-ascii?Q?EPOwzqPdkQWaVk5vwnsiUGfJEUBrBhvV/TwVV2iNElU8/r6ooT32JuyAi/+K?= =?us-ascii?Q?7b/UhkkRAlqUr9zLqMsjshbsFRYtPtDf87qyCXAnTK/a7UBy0104Cv0bqhck?= =?us-ascii?Q?LMUH0RZVN9kt4vrlYqiQWTSR4K3LjNFWSw1L0txSBfkJdYRtOdj5jPYejfXV?= =?us-ascii?Q?7tcxu14GTUgR9xiKwSOAXHO9TU3neVIeVGVNgd7Epw7Ef7Tzsvbaq9pnY6HP?= =?us-ascii?Q?TI+hSSuXIqGKIwfwIqSYEhlXyVEx7k6C9u/egonotARHeMqoe7rGdL3t0H9v?= =?us-ascii?Q?ACZfCM4scmSREeP0SAvRgsWyWiIkdf6WhYUA+VU1azo84GCLTgymGLgMctPH?= =?us-ascii?Q?ruLiHVE9XEvlwQLwr6crlkbsv4zoZUmWYucTn+AJ+X+9BqsZaXqVZR7ZePfo?= =?us-ascii?Q?fTLCn6MGI+kwehaqbDCH3IaM/822nCfK5VxitSLnBSQPmg1ttBosW2R5bClN?= =?us-ascii?Q?D8oRgNOss4HEYsUnCXb/XcB+Y6DB0TmIX1DiWoOKynEFmObObmfLEQvJNsVS?= =?us-ascii?Q?BN79Iq3Snxeko1dKYKOKUfViPj/uzx4W4hY0kC6i96ArFlueyfTZ7/SjpSAT?= =?us-ascii?Q?i75EusIK4I9BXkpCwDUoiNI32gc2gciPeAil7ILtSpJMsIVs6IAMdipsEl4X?= =?us-ascii?Q?bgEckyy54CILlaSkzVoxCpTpezUf40VK9racwm6IFXzJ5MHBOsfvLlBiRtsv?= =?us-ascii?Q?esYcoXI/nDIWqKFdRmGDq6yXpI18?= 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)(36860700004)(376005)(1800799015); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2024 12:12:41.3529 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ad2dcdc6-eaa9-4efe-e0c3-08dc848fa20e 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: BN3PEPF0000B36F.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV2PR12MB5725 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org From: Venkat Kumar Ande 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 Acked-by: Selwin Sebastian --- drivers/net/axgbe/axgbe_phy_impl.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe/axgbe_phy_impl.c index f51830f800..bcefbf28f2 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,9 @@ 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 != 0 && cmd != 5) + axgbe_phy_pll_ctrl(pdata, true); PMD_DRV_LOG(NOTICE, "firmware mailbox command did not complete\n"); } -- 2.34.1