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 5E9AA43FC9; Tue, 7 May 2024 14:43:55 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C40AC43398; Tue, 7 May 2024 14:43:48 +0200 (CEST) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2078.outbound.protection.outlook.com [40.107.220.78]) by mails.dpdk.org (Postfix) with ESMTP id 3941B4338B; Tue, 7 May 2024 14:43:45 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bkK4VO/CcIrqslW7FEt1t2JrRfYuvA/U5mGYPqpJ5Hxyv5P87myBJe+0cXqYRHQcei7JUya6nQrlJVynhGRsRDm7x4MlSINphsUgprKzac9cYKUULBaZCxvlkZhnKFxHPbmlxM8gTtW/wlWDobSiMDBKbwrsSaCe9vQzXdywuXXB0z+nn7qjo+swkZU6wTyAIj6fe8hdVt8mrLrR/377bLLQ8wJ2VMHq7hHCUvnBxg1b0Av9bnywVlPevvhzqeBzIKvzsXLBbrTklQaQZFm4qJr5aXWU1envCCUoN2s/0Bm84e9ZxcyHCCE29xYzSZ6ce9MBZ5IHe5FdUlHh/dErYw== 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=85y1OWZ5bRELxKztXVFOi+N3mU8TwOZVpw59DIX4Nwc=; b=VEYHN4czI2i8SK18VUyGjDrWur+H2YkFylxQ1jPPgrr/TN/+URClnS91pWmUv6JAUaefJyOKhQu/j1Sfb7K8lizjLg03rq83nfhXkXHNReUEcXUot/0aGEkJqS5pWlOjHhjm4ybRljDOrhusuDS4tbNF811vsnspivS4gePEiy9wB7RpfTI9ts2llvQfJE085JwCNuKXODXdDuZ86QjijhQ2/Hi9CNr8ZlAqDZJZ7oYGnCSNKAKxLGgGIrAziSGn39cXFDr7qyrdWgAg7iZh8dGQVGpJhO8jmm0w3WKRpERrlSx+YFRCyvgFaUj5Ku+DN8pC/iewoujYipQJWHxvVQ== 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=85y1OWZ5bRELxKztXVFOi+N3mU8TwOZVpw59DIX4Nwc=; b=Y/xPfiB+i9nhIOf4wMQ6aVgPa9Ld27fEteyue+3irD3GuH3XbRacbuTwgoe2Nw1RdEyMINjAUEW023Gz0FCJ1mjiyMXyLJnvIDREg6o7Ln8Pwsc17jcVg7hHo06S8mAStwZLfLIGfJ//7P/Mzq9+7t0Vx5dLR03nzOODxTIMzWY= Received: from PH7P220CA0033.NAMP220.PROD.OUTLOOK.COM (2603:10b6:510:32b::33) by DM4PR12MB7599.namprd12.prod.outlook.com (2603:10b6:8:109::12) 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:42 +0000 Received: from SN1PEPF00036F43.namprd05.prod.outlook.com (2603:10b6:510:32b:cafe::8a) by PH7P220CA0033.outlook.office365.com (2603:10b6:510:32b::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7544.45 via Frontend Transport; Tue, 7 May 2024 12:43:42 +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:42 +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:34 -0500 From: Venkat Kumar Ande To: CC: , Venkat Kumar Ande , Subject: [PATCH v2 03/25] net/axgbe: fix fluctuations for 1G BELFUSE SFP Date: Tue, 7 May 2024 18:12:43 +0530 Message-ID: <20240507124305.2318-3-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_|DM4PR12MB7599:EE_ X-MS-Office365-Filtering-Correlation-Id: d7109a7b-44d9-4993-1d04-08dc6e9353cd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230031|36860700004|376005|1800799015|82310400017; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?LEvo89pT/snpJq4i13cmPnXopMLBCjRATFaK62id2ErPRsMerPFP9QbkyNKU?= =?us-ascii?Q?TQSZhJdfFzYfxTPrSmxDfbWv7SyneF4T8oacCI+GIrlQKFgt8u/ZnEej7Yat?= =?us-ascii?Q?kvS+p1ae8Slqn1THwBIzZnVy8WwyYpEbkbImnMh2SmGDN40WafbIik27wln9?= =?us-ascii?Q?a6EZKUnrCTXpBWlgIXdPm+SG4T+qosdV06geZGMY17YgkEwkfA/e0HzH7yB7?= =?us-ascii?Q?z5aB9LT6NKf3xdcT/mkuSAB4b6Y6sEEh61LomPizvRbFAfjGO+NIb5D1bdH9?= =?us-ascii?Q?uZu1Tjs94DWtotuwyKimpc+yboPL4/DVmr9upfO7g/YQhqwaDhGWwxawVWtF?= =?us-ascii?Q?MJUzOqFYxpdRg2hfKyeATA8IgOmIs5xrnchDS8OvTGFEGt9gxAcd3GBIK4Uy?= =?us-ascii?Q?YfrMqBrGmdmoT1q5Z+yM803JExBPrAGP5UsdsCXu7wI7eYgc+DtAm2o5Exp/?= =?us-ascii?Q?ArhWXtAtypFgOaTzEZCcsd86kIAbpeMaoLjrV2/eDj9DCLZ2aYd/qcsMDQ1v?= =?us-ascii?Q?hNC8FaKYGKOuLEa0PkmCZmzSzpjCgrs99byKKs9B9C4R+27iLSFe5zrF4pbt?= =?us-ascii?Q?gRpv6igntLXG3SATZ4eN6Rw5847qySfGedVYiI6OCDAj8a2bdIPr+Xuo1Ki9?= =?us-ascii?Q?fTl0ehNPJqofxMGjzvHJvlO5EuoIUUwMTLlB9F+FQ4ycwWcQJTm1Fz18hrVN?= =?us-ascii?Q?FR3ivUzcEOZ+iyRwq4FqUKhmt0p/jAKURdL3Lq/HJyU9oWKm9M6znjqiQU3P?= =?us-ascii?Q?9Eq0MDppKtx1fyJrQ78tPPpx6PFexAmUORD8B2abORqfYzsvuw+Xxn6xpHgC?= =?us-ascii?Q?toVbcOV8Woo1RTZUi7t6IiIz0U8yPdwV3vuWav0xbEyzZOQXi+vwxRDDJnQO?= =?us-ascii?Q?efKjN6sKGgW0/kT7XWwuqVHLldSeOzJe9UTBd3Ib4+M+Gjt6aj5CBxG2a8O/?= =?us-ascii?Q?RUFNyAm2k587KXG9rTCOSjGeWXO/KzjhIZOj5pQY4V8zQysQ6B3m/T8SYt6D?= =?us-ascii?Q?A4gVkxGh7VpY9MecL6NVMUZjBwwd5q2A2zn+ilZueXhj01iWjvYNSgFuZtyX?= =?us-ascii?Q?k7v6FkQ92n5y/pjdtRrKknwgUieEf06x/yePnOfttYmImWCnHbgwQYC86wce?= =?us-ascii?Q?hMAGP0xGvHt8iI2IlOBPfbmjegz7QW67PqOu2B33EqrgTig0jpHhh2PHBN2C?= =?us-ascii?Q?d8E5u+z7I3Avf7a2hnly6NkAWvKnDU4eCp5n1YXf2LwwZZA5NLrPhEboFPzU?= =?us-ascii?Q?GJUmVZyTp0tIqdhncpO4jS3vsKql0gCke3ZPoBnCMqyWcvNUs7joNnwk3abv?= =?us-ascii?Q?RES/kRXhK5O2UAtak1G7hxHpnP7NRIbzEEGnyH/Ammxv4YhgOyQp0q86AWMY?= =?us-ascii?Q?CqCVUVQcHt+FKYr2N+HMp0Uoc2N6?= 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)(36860700004)(376005)(1800799015)(82310400017); DIR:OUT; SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 May 2024 12:43:42.4341 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d7109a7b-44d9-4993-1d04-08dc6e9353cd 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: DM4PR12MB7599 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 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 --- 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