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 1A20244153; Tue, 4 Jun 2024 14:12:43 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E1831436AA; Tue, 4 Jun 2024 14:12:30 +0200 (CEST) Received: from NAM10-BN7-obe.outbound.protection.outlook.com (mail-bn7nam10on2054.outbound.protection.outlook.com [40.107.92.54]) by mails.dpdk.org (Postfix) with ESMTP id C5FAB4369E; Tue, 4 Jun 2024 14:12:29 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LYavkMGrCDj+Oxk1VDLJ7BYD8jH3ks9Cq6hVY5mvL3+5vpIM5ZYPxvazbfniHLz/Qqzqvw33R0xUchX5QOIYopOkFrzaad+hVd7u05UPJCS9jkptsXP3RXCNC2EMp9JhNzn0E/O3youvzYLp196byEHb0zCV/g25WO2ZDAl+cF5EKhBQ2A45CU4yqA5M0uFwN3mrs/9E26sQOvFvllBiMm4Sw/Acz/u3ak4/NYa/MkyssP6/H5IQVydLIMyd/rM6q+RAVt9/sFaBI3bYI9LHmyKKfeG8Wj1qDTdCZsbfS15dyZulbvcoGmweAliHiuQTnMO42U3fGb1gPbqHfVGlTA== 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=UOk9mLDKhe1EUbONRMQ4yakNqlqHrWNE6B4bYVXxVmg=; b=VGOLireywXgXqdCWTcsHeTtvTqFEBb1rwpxBHeAVphRDYKFyVzPExCCpiaIjD0QogQZ4FXDGzmwsQcz+5OsVTCdfGoMzdKkEoFe7Kn8vpdEiGZAkVV2DF6zUatFzwJjXJ1Eydr8LxLub/jPIDmXBdOEGFBFcZzhBCopjUjDpVf6bqe3tdGdBytjbFCLqsGXOsJ91RApqPRIfxtfESsoCWP9rU02jx8vdUNwmURuXM+Y6tx9BlNZSlhSJKHdxadCRtw2XPFhDr+rN+1yocv2kMR7T+l0/yFW0J5eQlOuqgkITgRmQkmLD/D4Hk/bbknJAm8+GJboR1ev6xFjx6WmqvA== 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=UOk9mLDKhe1EUbONRMQ4yakNqlqHrWNE6B4bYVXxVmg=; b=vzUdVbLRlwbKQb66aq1ZpxZtOKt0Q+Eu4xPrSPA9nGVaFk2bZ0tQH8P6CVp13nVi8i/zh417S/GCB922uXSmI+93xOrYb7LvCFdL+0eTNaks4DCnQ+oo3DRH2Dw2TcxEawbpA+WtMLA4NCdyrgkN95MbPKS/RO3JUjN//pL8LIU= Received: from BN9PR03CA0963.namprd03.prod.outlook.com (2603:10b6:408:109::8) by IA1PR12MB7590.namprd12.prod.outlook.com (2603:10b6:208:42a::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.21; Tue, 4 Jun 2024 12:12:27 +0000 Received: from BN3PEPF0000B370.namprd21.prod.outlook.com (2603:10b6:408:109:cafe::81) by BN9PR03CA0963.outlook.office365.com (2603:10b6:408:109::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.29 via Frontend Transport; Tue, 4 Jun 2024 12:12:27 +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 BN3PEPF0000B370.mail.protection.outlook.com (10.167.243.167) 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:27 +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:25 -0500 From: Venkat Kumar Ande To: CC: , Venkat Kumar Ande , , Selwin Sebastian Subject: [PATCH v3 03/25] net/axgbe: fix fluctuations for 1G BELFUSE SFP Date: Tue, 4 Jun 2024 17:41:35 +0530 Message-ID: <20240604121157.3052-3-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: BN3PEPF0000B370:EE_|IA1PR12MB7590:EE_ X-MS-Office365-Filtering-Correlation-Id: 87096cad-2005-486f-d03f-08dc848f99f7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230031|82310400017|1800799015|36860700004|376005; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?vmwEYQ9i6KWIKlz4/JDfP/fM5kqUsqhKRkm2G9up10TBUkr+Rzi7B4rs7ZOL?= =?us-ascii?Q?WYjYwyMLgRjk/3hR/ip5kEpWC7rf+FMoFspr+pItjS6A3e3g0w1YYX0tTmqy?= =?us-ascii?Q?OGTN0wPbaXELdvHTy7kHv9JDIAPQUGf3rqZLUfzdQpFn5ucRggp9Rj1u6Mba?= =?us-ascii?Q?LjOQyrgQuP41qT3zQ94xRbK73I1KVtD54iXzX1m2dEjdzsKxhjX/6MWuhyuA?= =?us-ascii?Q?+zFyqlaxZesGMbePIfrVm38zfoFILzK7OfZdQsGyuB2AE3VtcC73MSKgv5U2?= =?us-ascii?Q?utWwwlUeDLHAtC7PGI+6z3P+sLwmO8G84op6AwCjmC7CxMlGu/xaUrdJTctf?= =?us-ascii?Q?VQz0vw79YEO6jM0sGviUM/PdveQiwSgL6xhos3ZdWmPeDOcnbUV7m8hfDZya?= =?us-ascii?Q?S9MSkXwkOtn4xCi/LR19ogjm8CYidUzoURIMd7VRmV6JDyvkMdCcKw4C0TY0?= =?us-ascii?Q?WpE9XeMIolk3uGRwDufY7n911HobQDHCTq2n/q1v3++x8D2K6uDlURqLve7R?= =?us-ascii?Q?Q0D+NTAc3/NajQcV3NMwLN/Dd5zfOcFke/I/JWy+L/p0MnlVyqQWeourNWoX?= =?us-ascii?Q?96n+C+16y+70zu9AqBgtxAIkSLed+rAjco48OPKSs39M573MvJx5piY5Nr91?= =?us-ascii?Q?tv4UlsffoDerqcoNHYKpAoZWxbB6Rlmw2N23ToXkXSRaZ7dqGBdc2nAudwi2?= =?us-ascii?Q?49BhY9rcfeXHuhScLbLTUsQKC6Wy+w7QXNPzqmIuyt7A6PduRPrWG/KcJ53C?= =?us-ascii?Q?coKvd2auy0DKTlg/mEjHTsgO2hetiQtYSI7IKAJ407O6PTy6u/PXr7Ny1ULz?= =?us-ascii?Q?T7rMpHYaEvfC/c9BjC1G9E5Fv4u8zj9aGtQhPtmSKce26rR5ptR4O1y24yT5?= =?us-ascii?Q?3AWKB2qzUbtcmCe2j3t+bAiNxeE11yk3TSFoQZlYoM5tp2+py9Uqp8sedhb/?= =?us-ascii?Q?7fo/tPPSqym+FPHi5XCVOmj+kb1ZVTYk6xKmb4UHGGIB/KKokGaQZrWFFzfM?= =?us-ascii?Q?3SdEokA8QvbAoH4uDyhEYT0IdqjSBSkZLTFUHo+adfON5sl5xuOHPj47+zGk?= =?us-ascii?Q?npdoMsjcKZseNneqfiKzrqPt3vjouB5ZVxxH50pWW0VV/MRxm7NEY4utH6In?= =?us-ascii?Q?5XKPlaayBJCWASYeDveOxUKhnFyhZ6cbkLFtoaJvMAaK02r50ATEL5y+Uhp8?= =?us-ascii?Q?at52Izwe2PbKuhsJ8uw53PItOOgoe99CwBmkMZ26hrPCIKbO3GMoSLXXVxnJ?= =?us-ascii?Q?i8MZigy0ei/z7WiaH4fA3vGTQhyjd5/NOPX2hRBo2sXwne8FUv2SnpIZILrZ?= =?us-ascii?Q?FXUyuWGMrK4X0BvoVlJfgNncOet3f/8U84737gxv0vtUEsOkWAIcVdkHCIrv?= =?us-ascii?Q?GnXsMkYfFbe8XZles5lS4Z9zMuFT?= 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)(36860700004)(376005); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Jun 2024 12:12:27.7643 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 87096cad-2005-486f-d03f-08dc848f99f7 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: BN3PEPF0000B370.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB7590 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 From: Venkat Kumar Ande Frequent link up/down events can happen when a Bel Fuse SFP part is connected to the amd-xgbe device. Try to avoid the frequent link issues by resetting the PHY as documented in Bel Fuse SFP datasheets. Without the fix user will see continuous port link up and down. Fixes: a5c7273771e8 ("net/axgbe: add phy programming APIs") Cc: stable@dpdk.org Signed-off-by: Venkat Kumar Ande Acked-by: Selwin Sebastian --- drivers/net/axgbe/axgbe_phy_impl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/axgbe/axgbe_phy_impl.c b/drivers/net/axgbe/axgbe_phy_impl.c index 54fe9faae0..ee9dcbe3da 100644 --- a/drivers/net/axgbe/axgbe_phy_impl.c +++ b/drivers/net/axgbe/axgbe_phy_impl.c @@ -578,6 +578,9 @@ static bool axgbe_phy_belfuse_parse_quirks(struct axgbe_port *pdata) AXGBE_BEL_FUSE_VENDOR, strlen(AXGBE_BEL_FUSE_VENDOR))) return false; + /* Reset PHY - wait for self-clearing reset bit to clear */ + pdata->phy_if.phy_impl.reset(pdata); + if (!memcmp(&sfp_eeprom->base[AXGBE_SFP_BASE_VENDOR_PN], AXGBE_BEL_FUSE_PARTNO, strlen(AXGBE_BEL_FUSE_PARTNO))) { phy_data->sfp_base = AXGBE_SFP_BASE_1000_SX; -- 2.34.1