From patchwork Thu May 23 17:25:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Asmaa Mnebhi X-Patchwork-Id: 1938494 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 4VlZnk4n5jz20PY for ; Fri, 24 May 2024 03:25:45 +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 1sACC4-0007A1-Bb; Thu, 23 May 2024 17:25:32 +0000 Received: from mail-dm6nam12on2065.outbound.protection.outlook.com ([40.107.243.65] helo=NAM12-DM6-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 1sACC0-00079h-6K for kernel-team@lists.ubuntu.com; Thu, 23 May 2024 17:25:28 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AIcwJMORgpaHWdhavK/52xgxILDqgTODL1+3hAHBsDXbcNKPbWelXiZNMlnFVWEIGrnUH+0aUTb+ohZt9TBcltkILmeqLd+3GxSypQCxXGgeBQ1JOFoi4PuYD4pv3QbkhWU7DTVNgroeHQtby9nHsD7UZ9d+ZxVRXV9kP7QomnCx2wzequW3QwtGppaDt1pUEgreSWguE93TgzC6860IB+Yj32fxL10/ZA1H0Q0hkaOerwh4ro5cj5LJYYkZQttDWNWW2Bc2vlfdsEalvSJjB84p3o54cFZPyFK/SpzHDOYUyV7BS5IhEAccn9yq9ep/wiA7kylVF+F9P1JUHvln4A== 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=7QLnjGp7uaxLzpRlZIuUovaG98mXuqoqTfPajKzS14o=; b=blka1s5hqNChyjguQqMlEKDZrHr8TZN7uzBd8YIJUJW+So2dwRrPYsVXxmrhH8ROeulfGI+NiX1A9D7zpNsTIY6oxu3LY/mIlXn+LjoT9HAjBBY4wXBtsnW3XUCPfc3EdtHKIMZvuf4l0Sfig5emHHvxWqDbYhEkulsdK4psdTuAZopKvrY/ld5K9nItU4oqd9ZyVzeniDvGRxFKXZCzaGvB2TnQ8Px6H3AwWpS9TOOGqsehNnzh/kG8PkRpayHXEk8oSBIeMlB6s6RT1+YrhFG/fWt/gEWZmOICiLH5PlhkCHNI0Bt1ehplnfXDFcD10HjStB0jUmKyuYd2GtYCgQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.233) 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 SA1P222CA0142.NAMP222.PROD.OUTLOOK.COM (2603:10b6:806:3c2::24) by CY8PR12MB7314.namprd12.prod.outlook.com (2603:10b6:930:52::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7611.20; Thu, 23 May 2024 17:25:22 +0000 Received: from SA2PEPF00003F68.namprd04.prod.outlook.com (2603:10b6:806:3c2:cafe::bc) by SA1P222CA0142.outlook.office365.com (2603:10b6:806:3c2::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7611.20 via Frontend Transport; Thu, 23 May 2024 17:25:22 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.233) 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.118.233 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.233; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.233) by SA2PEPF00003F68.mail.protection.outlook.com (10.167.248.43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7611.14 via Frontend Transport; Thu, 23 May 2024 17:25:22 +0000 Received: from drhqmail201.nvidia.com (10.126.190.180) by mail.nvidia.com (10.127.129.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Thu, 23 May 2024 10:25:07 -0700 Received: from drhqmail203.nvidia.com (10.126.190.182) by drhqmail201.nvidia.com (10.126.190.180) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Thu, 23 May 2024 10:25:07 -0700 Received: from vdi.nvidia.com (10.127.8.14) by mail.nvidia.com (10.126.190.182) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Thu, 23 May 2024 10:25:06 -0700 From: Asmaa Mnebhi To: Subject: [SRU][F:linux-bluefield][PATCH v1 1/1] UBUNTU: SAUCE: mlxbf-gige: OOB PHY stuck in a bad state during reboot test Date: Thu, 23 May 2024 13:25:03 -0400 Message-ID: <20240523172503.1746-2-asmaa@nvidia.com> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20240523172503.1746-1-asmaa@nvidia.com> References: <20240523172503.1746-1-asmaa@nvidia.com> MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SA2PEPF00003F68:EE_|CY8PR12MB7314:EE_ X-MS-Office365-Filtering-Correlation-Id: 62e9ef53-9143-40ad-c874-08dc7b4d536c 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: bcmindWpM6RdYpo/Skq2kak+9zgF+fPJd7mVcD4QSCE4stni/gdXWATI5kI3ZeQ4EKo8SLT0tTLndbAeR1MObbIG1R2BxFDJ8bJY4w731QNme1qMyYjEePOvlCTk+Wccci9so896wgh30SePjQs4iSS7dVrErh4ptvw5SRrwFXa7Mgn1K4H7+ICXELLEFSMhEgP/TzvKPdL0aOKpjxcxopNn+vieyZFlveimjOu5Jn/yCEylEqyi/wuylFkrLskq4g8nbl4alLi6141yL/U+xQYzymxd990pgskakFKhL4qqcEZW1cXC3kItgttA90XHcm1S/Y/8aAL4CVFSCLlwBlcKXcl90+POxuoGnI5+TxTlDxPNMj2oZGL5QoAZe5AvoeLrf8mQk7zK4bHELRegMV4y/P1XVhiT62gbZGmZPudEus2XYwIHoY0xgoYQAWJInu1bY5ga4mIV6+IEAjbD2vjr4afYomIG4l0HcvxBoENZTWRD9/d7WZCz51+6GLl52Z6qlCZCrUwOZqKtixlrNHRWH3tEWqRMoep6eVulBPm3QEkdr+eQpJcQRMrqieO4/8lySTCWj/WijtiY6XO7aIKL7pjnbX7gtptw7/8JbJ9eb9bvnSE4iVrxMW6OkfEot0KkpErOfWBa9i62rioRyqv6sbYnJGZVzzNdvnrdr0CdFqi6aHHChIVJJ2vf17kZYElq8P6uLtxqcOdNTQcL6i6dbRBuWbPqh3KAcGzROW985ESetfcd+bTyjRACAaz2MTNSxlocQV4bL5Gu+OQaYU/MrhADwlVWnc2NU99i3SBD5r8LT4//3W+pEuwVO1FLCWYfG7Io7FusDfaIwwJ2E9Dj6VwUDNRrLuIFoMFHfWZfmVK5yAtQ6/JLCfpuWT2IGpv9j98sDT7P7h96gkdUtN9XDa874bEAmWVn/fLfq9Ehd49s+6u07AoA+K0YhYYCYnQTJfInJ/SilC0ZOtJJJBCYyaFP+q+ywZaj/nDXbQbWzOgwXbpv5Ub36GzGOyh6d4/Yv+BVA5UTQWfXnqx6/WCy7Z6ddZzA1BJMVlRHxmayD7T22ri1gvDVFaUZquq1/rvWlv2r+JkpNYnecXINRPqt4CO4RRWZCOSGa+k/sK2uxjZBmfKegVIMwBJasNgKvmgij4pwpGe28UInD/ePaK6nN4KE2q2Y9jYDMgsajAw2jO8gsPsfY+O+Eppz+gXMBoRtwcuOfgFy4ktWbSf/e18n3QpgHLYQRFEcpcFEqgfWtJS3WtJvtKjukx8b3qGoesUs4zv3tGZN570VDnso4xCzOm9fOtnv3926XxnTOz1IAR1CnpmEUflXkI91LAtEc5Vsd/itxuat+Xc9Nh1C/u0+ed/bSokOC0swYzQ2uzQ= X-Forefront-Antispam-Report: CIP:216.228.118.233; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc7edge2.nvidia.com; CAT:NONE; SFS:(13230031)(82310400017)(1800799015)(36860700004)(376005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 May 2024 17:25:22.0854 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 62e9ef53-9143-40ad-c874-08dc7b4d536c X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.118.233]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: SA2PEPF00003F68.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY8PR12MB7314 Received-SPF: softfail client-ip=40.107.243.65; envelope-from=asmaa@nvidia.com; helo=NAM12-DM6-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@nvidia.com, David Thompson Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/2064163 During the reboot test, the BF3 OOB doesn't get an ip. the root cause is the PHY getting stuck in a bad state that's only recoverable by a PHY hard reset so a powercycle. Warm boot doesn't support this capability. We can avoid this bug by preventing the PHY from entering this bad state in the first place. Since the UEFI OOB driver doesn't have the issue, we mimic its behavior in the ExitServices() routine by disabling the OOB port. Although the PHY issue only happens in BF3, disabling the OOB port in the shutdown is a fix that should apply to BF2 as well. Signed-off-by: Asmaa Mnebhi Reviewed-by: David Thompson --- drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c | 6 ++++++ 1 file changed, 6 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 635009a209d5..c5f658d553e9 100644 --- a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c +++ b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c @@ -216,8 +216,14 @@ static int mlxbf_gige_open(struct net_device *netdev) static int mlxbf_gige_stop(struct net_device *netdev) { struct mlxbf_gige *priv = netdev_priv(netdev); + u64 control; + + control = readq(priv->base + MLXBF_GIGE_CONTROL); + control &= ~MLXBF_GIGE_CONTROL_PORT_EN; + writeq(control, priv->base + MLXBF_GIGE_CONTROL); writeq(0, priv->base + MLXBF_GIGE_INT_EN); + mb(); netif_stop_queue(netdev); napi_disable(&priv->napi); netif_napi_del(&priv->napi);