From patchwork Thu Apr 18 15: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: 1925089 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 4VL1nS3dDtz1ymh for ; Fri, 19 Apr 2024 01:25:47 +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 1rxTdr-0002OP-5t; Thu, 18 Apr 2024 15:25:39 +0000 Received: from mail-dm6nam04on2069.outbound.protection.outlook.com ([40.107.102.69] helo=NAM04-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 1rxTdp-0002O7-HK for kernel-team@lists.ubuntu.com; Thu, 18 Apr 2024 15:25:37 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h/lAb+z6pXiaLAG3EDTx08u6pgeGWF5Sxw3wEHCX9pQUp3HolAd2bS0rRw58wAjQ+lXfqF153LUja4/nxp3dogeNgu81y5p8kQ5HVemfvAK1idLi735Fe/TNOWCAONWklnTgmME0GlZ/avnu/AVmMOcYEbf3nRocInT0F+RsXSw4tAEOY1P5F7nxAgvUF0SOgTquQQPAhoOZRKxEEQATmA8c0A3AZa2VpmDAsyrene5zvfsjELLa01trJPClJQUrlkyOvLOXCdINjtscSdtmp9PydEx5M6tSQ+1t8ufVbwkp+wGaibeaaCFNa21GZ/pG5BkSYxGyj/2I0SMWxuLJfw== 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=kTezCFSCAIFDG1nckv+KsusNTScbKk4Zk3uxoaCrzsM=; b=hsGmR4Lgm58l8AYYLDT8FoqfPjl0EnaPdzFhRCTzzGDNEXz4ljp8dLcAlziDLHFiazFpFCUugfVSI9kyyO00tABYynE6sNP+bW9PwZByVt5CjD6HihrgWrgfIkQYj+QIXCLjjKitx5s8dqM102+NCB2cMaANj+3zLoRVjWkndyrBr1jPCp1EU3sulFI56sXebGmbaGAT0z8Zx9BEH1f8+Gx532g3EuuCp7IcdEMgOPe4PbbJpSaaUk/D1kvNGQ3FjW4FH2mBta8NWaGqZRi8UvR0KWs7bxCuxK2L7zg4/5tHbCJSs25pOy7FdxKtKw1NVKStRY0QXIhERxyIkbLIfg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) 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 MW4PR03CA0008.namprd03.prod.outlook.com (2603:10b6:303:8f::13) by IA1PR12MB6651.namprd12.prod.outlook.com (2603:10b6:208:3a0::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.50; Thu, 18 Apr 2024 15:25:32 +0000 Received: from CO1PEPF000066E6.namprd05.prod.outlook.com (2603:10b6:303:8f:cafe::d4) by MW4PR03CA0008.outlook.office365.com (2603:10b6:303:8f::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7495.26 via Frontend Transport; Thu, 18 Apr 2024 15:25:31 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by CO1PEPF000066E6.mail.protection.outlook.com (10.167.249.4) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7452.22 via Frontend Transport; Thu, 18 Apr 2024 15:25:31 +0000 Received: from rnnvmail204.nvidia.com (10.129.68.6) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Thu, 18 Apr 2024 08:25:10 -0700 Received: from rnnvmail203.nvidia.com (10.129.68.9) by rnnvmail204.nvidia.com (10.129.68.6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Thu, 18 Apr 2024 08:25:09 -0700 Received: from vdi.nvidia.com (10.127.8.14) by mail.nvidia.com (10.129.68.9) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Thu, 18 Apr 2024 08:25:09 -0700 From: Asmaa Mnebhi To: Subject: [SRU][J:linux-bluefield][PATCH v1 1/1] UBUNTU: SAUCE: mlxbf-gige: autonegotiation fails to complete on BF2 Date: Thu, 18 Apr 2024 11:25:03 -0400 Message-ID: <20240418152503.30820-2-asmaa@nvidia.com> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20240418152503.30820-1-asmaa@nvidia.com> References: <20240418152503.30820-1-asmaa@nvidia.com> MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000066E6:EE_|IA1PR12MB6651:EE_ X-MS-Office365-Filtering-Correlation-Id: cfa3c7bf-e10d-4b3f-847e-08dc5fbbc943 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MssPYul9HF2qh0elrVBu8lNWfpMmvaEAno1DET8uB+oB8QPnFO6SKjsWSUURLjGqChjpUMQrwaDIcNq1IO6/GSQPwps6pc+kCl/bu29f+R3DeunSZo0OZfrv+xiLNJdZS9ewgly+7Tztuz7ySb5HzLX0hQCY44jJFbyb4y5XnF0JkjFnq+MfcYfmeNX1+XDtl8mQiA3wzJC7Mx+i7BMoaW7o9ZI28ssIZ1jlJtVoXsWNe/K78XIOkutPRV8+jMCYtSkQmY/n7HDiJUVVcHhxacQnCfKghaLLMuZkDa++ZnsumtrAqmHrEnmZpxjFFtMJg2kvkqUevh8B52W+tYNRjnwdayvU30A0NVUSiFhTKcTg+LloGZN+xOrbHBDMAkC/2JVlpHKulUjJ5+gylZEq5CA2Qdp9ffnYB2OTg3Wk6qXA9VbNDhGaC46ylSIHFEjaa1a0gnZi5HXqr1Iy3jnEBwqTZEFaDiZR5HHcycUZcioiBzO05pKaPuHdJl/Uae5xQQZ60AJ5PSbnPUcg6C4PSp9qDb3PD7mbrJyx4RUl7ot3dgtWg3eLfJTrch+Jym9c92z7Iow6yQsY4lgP0owbf6XgtJ6/rC/RhP6yiCmdQc2BPo0VxU+pqVi2tk8w/vuCFT6U3sbOcioyQl2jZCM9I1DglkzcCuMGfY4Kb+iVBlts6Shmz3gp9tiVb7ru8njbOuMIfSmDyExNpZggBpwR9W5v0SuifGWQxvhzewR686fL6ASQ36jLS0l5eOn/SR1l X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230031)(376005)(82310400014)(36860700004)(1800799015); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Apr 2024 15:25:31.8998 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cfa3c7bf-e10d-4b3f-847e-08dc5fbbc943 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.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1PEPF000066E6.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6651 Received-SPF: softfail client-ip=40.107.102.69; envelope-from=asmaa@nvidia.com; helo=NAM04-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 Mnebhi , David Thompson Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/2062384 During their reboot test, QA found an intermittent issue where the OOB link is down. The link is down because the KSZ9031 PHY fails to complete autonegotiation. Even under "normal" circumstances where autonegotiation completes, it takes an abnormal time to do so (on average, at least 8 seconds). Hence, the hardware team and Microchip are involved in this debug but the root cause is still unknown. In the meantime, we need to provide a software workaround since customers are starting to see this issue as well. Signed-off-by: Asmaa Mnebhi Reviewed-by: David Thompson --- .../mellanox/mlxbf_gige/mlxbf_gige_main.c | 17 +++++++++++++++++ 1 file changed, 17 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..e377aaa4a2f4 100644 --- a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c +++ b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c @@ -132,6 +132,7 @@ static int mlxbf_gige_open(struct net_device *netdev) { struct mlxbf_gige *priv = netdev_priv(netdev); struct phy_device *phydev = netdev->phydev; + u8 timeout = 10; u64 control; u64 int_en; int err; @@ -154,6 +155,22 @@ static int mlxbf_gige_open(struct net_device *netdev) phy_start(phydev); + if (priv->hw_version == MLXBF_GIGE_BLUEFIELD2) { + /* On BlueField-2 systems, the KSZ9031 PHY hardware could fail + * to complete autonegotiation and so the link remains down. + * The software workaround is to restart autonegotiation. + */ + while (timeout) { + if (phy_aneg_done(phydev)) + break; + msleep(1000); + timeout--; + }; + + if (timeout == 0) + phy_restart_aneg(phydev); + } + err = mlxbf_gige_tx_init(priv); if (err) goto phy_deinit;