From patchwork Thu Apr 18 21:10:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Asmaa Mnebhi X-Patchwork-Id: 1925301 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 4VL9SH0kydz1yZk for ; Fri, 19 Apr 2024 07:11:26 +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 1rxZ2M-0001Tu-4T; Thu, 18 Apr 2024 21:11:18 +0000 Received: from mail-bn7nam10on2088.outbound.protection.outlook.com ([40.107.92.88] 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 1rxZ2K-0001TS-M7 for kernel-team@lists.ubuntu.com; Thu, 18 Apr 2024 21:11:17 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bNFKRnE/H8tq2uBqoo3eE5KpkaYEz3khjGe5CNOTpNSI4uwpPT1SZI1ABxnzQ4HvJM8ia+zUZRjQwXuR+N6hnpJ6ATNn/AVMle3VndA9BmC5k12HDYX7NgPGx7V3KIOTnuuwsCC85/ge5MVyrmVpqWmPiVbpw+fCizb6+CJb9Pffixd8cDqhGPxpPcreF8Leo4BOpUUcLWKHUnxJBG5RkHbCNhWiJfGE5cI55YqEWzamOFBDvmikgQsCXPVDw8eO3NKd7PvBrL2ZdHkuX0+YIoGmdTjJTI8ID+vV8Bfm31oPWB/ubCoj+J3QNw4OPDsKRe6Fu66qD0YuTe3T5QZ0ew== 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=eED21fumjWCjj8BHXcelDvhtTLxa7cHzUC1WbplKaZY=; b=g3tkrmzYY7qLHAtdHmgcMHBV2LB2k1/N4Lfv5fE71vMHZ16xj2yZsLFh8QFMp4RM46I/Ot4OAum6VCdfhF4R+Ne7O8e1e2BctrVSw6df5AYE3mtnCJwquPMbAYVQ+i7yiV0RFsCYopLjX0Fr3+KhhAAiiHIq1qBLGipjaShSGEP2QecDEvI+E6lm/vS+eVbdkaKlLW233hNzv31JUnw81pUN6NNrhPUGLvwgQMyibRXSDzednWYWI1QSnG9l4lmw9gYIvefsCoIYCTMBYW5X4AntfsMTVkshVLdr7LZICi9qTH6KKJPaSEn3QiSpbdzgM6V6OvH/31+p5cW9cp7BRw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.118.232) 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 SJ0PR03CA0344.namprd03.prod.outlook.com (2603:10b6:a03:39c::19) by SJ0PR12MB5612.namprd12.prod.outlook.com (2603:10b6:a03:427::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.37; Thu, 18 Apr 2024 21:11:11 +0000 Received: from CO1PEPF000042AB.namprd03.prod.outlook.com (2603:10b6:a03:39c:cafe::12) by SJ0PR03CA0344.outlook.office365.com (2603:10b6:a03:39c::19) 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 21:11:11 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.118.232) 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.232 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.118.232; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.118.232) by CO1PEPF000042AB.mail.protection.outlook.com (10.167.243.40) 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 21:11:11 +0000 Received: from drhqmail202.nvidia.com (10.126.190.181) by mail.nvidia.com (10.127.129.5) 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 14:10:53 -0700 Received: from drhqmail201.nvidia.com (10.126.190.180) by drhqmail202.nvidia.com (10.126.190.181) 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 14:10:52 -0700 Received: from vdi.nvidia.com (10.127.8.14) by mail.nvidia.com (10.126.190.180) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Thu, 18 Apr 2024 14:10:52 -0700 From: Asmaa Mnebhi To: Subject: [SRU][F:linux-bluefield][PATCH v1 1/1] UBUNTU: SAUCE: mlxbf-gige: autonegotiation fails to complete on BF2 Date: Thu, 18 Apr 2024 17:10:46 -0400 Message-ID: <20240418211046.30873-2-asmaa@nvidia.com> X-Mailer: git-send-email 2.30.1 In-Reply-To: <20240418211046.30873-1-asmaa@nvidia.com> References: <20240418211046.30873-1-asmaa@nvidia.com> MIME-Version: 1.0 X-NV-OnPremToCloud: ExternallySecured X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000042AB:EE_|SJ0PR12MB5612:EE_ X-MS-Office365-Filtering-Correlation-Id: 9211f06c-b765-4cf2-fa46-08dc5fec12f4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Sr0PtxCpfHw+lohgGu1lt2o3m8gjBHLMbP2Ejvs5UYW7C5ggxRB9GmzuMx5/nw4V5mpYaDkZkvd0c3klNkWuU90IWcCiDJBbNY/drOBh3YHtt/4+CvPgEqwbUwMwtu2Eu5OIu9ADQD64UGKrhEp3dP4tqHzzxLqfpEkz2LOwcqAP8A3MWYU/M6Y2ROQWqlSbbjJPhXJV7DwfBuM6e3nxjo+0Relui7Plfv2Waszh1n9lvDXbunx7cArO6Z4FRnGyojiv+00Ev4NN+7fPmvzKZ12n8IA0jCEOp4pg2MLPwktPxXjxc472S3Vg2HtTb5vZQP4rlSxuY8O+wCymju/Gww68CYDs3FUloZ4mgCUjYLjOEYOPtMFXfWHztSnX/KpyYHemKnNY84C3BwkoZ7G0t1c26C4S5hohz9SO1p9Rt/zOT5PdjQ3CzwGPfBtro8oPIercCwJiuMTpTU9+Bm2fgriZGZj1fK5YINr2zUYKTJNsQbWb2VqTYSXmti3fHnDFqhOb12LFfCsK3gwthWeWdGU7MKI20a2b+Ntr/33hnUkM5vUE2L7soOjjsM5TmpeE/Aq93zxY33C1JfErxN5hjgy7NKLr+S3WWTfXDz9fodEDRGcs0/LsO50z6XNYea5Z17sQmMX6NiHTNVsFkwH6ZqWVn3n0iMOJI/uevi56dmZluLnu01HMusrSymzgtMIqQ9XIgWSpTqbDTD1Trld/eXIigm0Tw3tfUF1J6ZFSkW4Up64nn3onR3JOfa0UMnBX X-Forefront-Antispam-Report: CIP:216.228.118.232; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc7edge1.nvidia.com; CAT:NONE; SFS:(13230031)(82310400014)(376005)(36860700004)(1800799015); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Apr 2024 21:11:11.3795 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9211f06c-b765-4cf2-fa46-08dc5fec12f4 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.232]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1PEPF000042AB.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR12MB5612 Received-SPF: softfail client-ip=40.107.92.88; 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/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 | 15 +++++++++++++++ 1 file changed, 15 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 d322d9fb06ba..635009a209d5 100644 --- a/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c +++ b/drivers/net/ethernet/mellanox/mlxbf_gige/mlxbf_gige_main.c @@ -138,6 +138,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; @@ -163,6 +164,20 @@ static int mlxbf_gige_open(struct net_device *netdev) phy_start(phydev); + /* 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 free_irqs;