From patchwork Mon Apr 29 20:01:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Asmaa Mnebhi X-Patchwork-Id: 1929156 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4VSvPG3K8Sz23ny for ; Tue, 30 Apr 2024 06:02:09 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1s1XCG-0002qd-EQ; Mon, 29 Apr 2024 20:01:56 +0000 Received: from mail-bn7nam10on2040.outbound.protection.outlook.com ([40.107.92.40] helo=NAM10-BN7-obe.outbound.protection.outlook.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1s1XCE-0002pZ-B1 for kernel-team@lists.ubuntu.com; Mon, 29 Apr 2024 20:01:54 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=D0S3TzllI2og69sccMQ1AImcvIyuIOih8FUuaUu6omfcd5t9qW+q3BGHB7vtZsB7Ma4vtQ95gRderetyQuhX1ICQx6ULJXTk5cU6nONfcd5129Zz3+i3fNpIHyfiMrktez1Y7SF/fBmw6Pxm40xNsv53DULDL+XfvEuXtJwIo4fV0LrYS7DQc5dWUKgn1ec9sIb9si7khoqz5ids06MJGT+E8jxlBCosAAqGnvWB2OcpRj5ZqoH5w6MNEXat7MVS1nrOIoOPJn4Fy6Zyd0CiHQ4bP8+BQKhBincaPLjohmmewR9AVXojLJZvbt5052JthAmhNuAZn/BICLuSsCLYEw== 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=C7piuua4cJOsny7/gWIXUBEu7rWqlZ7GbsZ2+Nrmiw0=; b=MMkWuuFkv8lMs2ziJyW3XN8kM5PD7WLiLQDh4yfMW+jATFX518wEvA+0SYnbqn2srQ5LDwW4c3npVMEzO1oz2K4A4WJtpmodw+C8eaRZlLcX4jpmgPf7qN1GKay4jstdvbWyZ3uU8CR47edXIjKWP/im9xLJu8tWDdaTaQusMGkDuQJRkhTPRLx0BvwR5dKE28R74MdrRgriLVXW6AK2xiTnwakUgIFyw3wofqDYTGebjMSnSgK2Cfw2bS5r6jA6hVPYhbBKzaqsmF2I4ALpyRHaNQaF+du8uWWbJKRxQMI/KF6R9oojbBcJI51UohmCxNzkKTu7JNyeFjJleBQtgg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=lists.ubuntu.com smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none (0) Received: from CH0PR03CA0394.namprd03.prod.outlook.com (2603:10b6:610:11b::28) by DS7PR12MB6008.namprd12.prod.outlook.com (2603:10b6:8:7f::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.34; Mon, 29 Apr 2024 20:01:48 +0000 Received: from CH3PEPF00000015.namprd21.prod.outlook.com (2603:10b6:610:11b:cafe::3c) by CH0PR03CA0394.outlook.office365.com (2603:10b6:610:11b::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.35 via Frontend Transport; Mon, 29 Apr 2024 20:01:48 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CH3PEPF00000015.mail.protection.outlook.com (10.167.244.120) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7519.0 via Frontend Transport; Mon, 29 Apr 2024 20:01:48 +0000 Received: from rnnvmail202.nvidia.com (10.129.68.7) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Mon, 29 Apr 2024 13:01:19 -0700 Received: from rnnvmail205.nvidia.com (10.129.68.10) by rnnvmail202.nvidia.com (10.129.68.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Mon, 29 Apr 2024 13:01:19 -0700 Received: from vdi.nvidia.com (10.127.8.14) by mail.nvidia.com (10.129.68.10) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Mon, 29 Apr 2024 13:01:19 -0700 From: Asmaa Mnebhi To: Subject: [SRU][J:linux-bluefield][PATCH v1 1/1] UBUNTU: SAUCE: mlxbf-gige: Vitesse PHY stuck in a bad state during reboot test Date: Mon, 29 Apr 2024 16:01:15 -0400 Message-ID: <20240429200115.29252-2-asmaa@nvidia.com> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20240429200115.29252-1-asmaa@nvidia.com> References: <20240429200115.29252-1-asmaa@nvidia.com> MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH3PEPF00000015:EE_|DS7PR12MB6008:EE_ X-MS-Office365-Filtering-Correlation-Id: 20b26c9f-0614-45bc-9fab-08dc68873437 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; ARA:13230031|376005|36860700004|1800799015|82310400014; X-Microsoft-Antispam-Message-Info: uQ84zjUYsJFcWFkjJ42Gzaga5hLu1Ee4/V3WjjOggCUOd7fUGutgFsCqCiOdnu3qVgevs6EZQjP+SMfOIOMUzHvT74qaLYRxB5GxqDFHT8/RsNYmA60PTOj9nZfHzp8b1HnCPhU11bcEZx786mTLVK9iSDlSCV/l2Tb2K17F4Nip0ZHtGqyLZiJMI01dCB/y1uGm0WROWms6Z1iGyDTUGyGe/8/BYBiSyc79Zd/nVSJTyD+tx0S79XNvFLVZTp4CskENad8o/7csNiBHgLc/wcJQAWiOvSaLuu6XxFNn3Zb5Ki5Z4epvef6jjxW3aqPyl39ySXwJyn10mEeMXW8v1qjQjXn7lbxvt842D2pNvjwY/ZQIZ+/ukVtNwH6SGM+oGxC6T4PvLlAQJ5Fj9dSlzyDObW02g0iD8wuYW8xVttPVT7LP4Sc4N2bPGmDUsNGC81PRGTlOLMNQZFlEaBmSl35wYrIJThF2HX4zgdEN0q7k9uRAp8BCLe/UV/aWPvd+uVSwFjQ+L4716kmdRHBroPwNJwva1ChrPoXIqInp2FlV96897n8uAe7bc8vCI2yhSJcKHbsDtXq+UQksWytDC0cyGh+N7cBPkp3Jz463dCoOYyWuCNz0mGSE8b6IA2Q+fJx79L+YIyyIUaitqqR9eAhrBf2XSvlNuvxP3T2pESMDsnWyjFRE6+yezXz2g2/xFbthv9wy9+pQ7PMizZmZVbOgYMYEdWFkCPSardCfvJgsBgpqengTd8e7xKF867/HB6AMiNBNCd9c9gECC5DD6fz9iTVQUkrsUokayN4YkEOpsHhqQfio/8l+98fUHlath2MjN/LptuXQhK0ImpjveckxJvOuVxEnAtkLW2A5WQlCS8/aTPU2uAgfvZ68cl3Gen7JE6ojeFSM7WQlPCrdryOpu/JDuLerQQT1ULMgJYHleujkG5xgxeKZh5Wz4Jl/DjSs2Mepy6Ky+sg8aKiN4opkyntGrhmYQlFBQynziL/ei7Tl2Amw5L0mit1fxQXjI0psJCEYFOYDjwVkjN9bxCBa74sSf8UDVJGA7iQHmTO7bsLRPZNFHNm+Z7IcchtDaS6ci2m7KE0AhCOKL4+131pzVuVB4+seYvyfPrA4/N4OuY+eFers7T7jyC47NPtMP86+9T83TM0ZP/S2ziYEBmJrOJ5NHaCaf6s+MW/ko+TiwPZ8TPV8umLN2mPKC9I7i5k9NflZXvVi2ZdAqRmwGv2R1EcSSqkxSJ0gESkpK/yDu01NyeADo3bcok2up+CoDDgwDhnqBYSR/sS2H2hpZoI47H45LsXRHbQIr08YfWn9S6ZctpD/loXR0PY9uRrUYcRY3DX+FARO9RZP03tdCrMv1jwrqgPiiVVxORw9a90= X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230031)(376005)(36860700004)(1800799015)(82310400014); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Apr 2024 20:01:48.4139 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 20b26c9f-0614-45bc-9fab-08dc68873437 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CH3PEPF00000015.namprd21.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DS7PR12MB6008 Received-SPF: softfail client-ip=40.107.92.40; envelope-from=asmaa@nvidia.com; helo=NAM10-BN7-obe.outbound.protection.outlook.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Asmaa Mnebhi , David Thompson Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/2064163 During the QA reboot test, the BF3 Vitesse PHY gets stuck in a bad state, resulting in no ip provisioning. The only way to recover is to powercycle. We might have found a software workaround to avoid getting in this state in the first place: suspend the PHY during graceful shutdown. Suspend the PHY = Power down = set bit 11 to 1 in reg 0 of the PHY. This WA passed 1800 reboots on QA's setup. Signed-off-by: Asmaa Mnebhi Reviewed-by: David Thompson --- .../ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c index 56235cef5cd6..ccf48640999d 100644 --- a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c +++ b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c @@ -539,6 +539,19 @@ static void mlxbf_gige_shutdown(struct platform_device *pdev) { struct mlxbf_gige *priv = platform_get_drvdata(pdev); + /* The Vitesse PHY is stuck in a non working state during the reboot test. + * The only way to recover was to toggle the PHY hard reset signal. + * Unfortunately, software does not have a way to toggle the PHY hard reset. + * We found that suspending the PHY before reboot might prevent the PHY + * from entering this stuck state. + * + * Note that dev_close() calls phy_suspend() but the vitesse PHY does + * not define the suspend function. This is why we need to explicitly call + * it here. + */ + if (priv->hw_version == MLXBF_GIGE_BLUEFIELD3) + genphy_suspend(priv->netdev->phydev); + rtnl_lock(); netif_device_detach(priv->netdev);