Received: by 2002:ab2:3350:0:b0:1f4:6588:b3a7 with SMTP id o16csp1889768lqe; Tue, 9 Apr 2024 03:43:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVeLDCmh+ICd0oukIvoQJqpKsAI4gDb/oOSSEiFSv6VDlY34pNRW6l5fL2ZqkpL0rdF2EuyP6+DxCKGhBSnWcMHFiet4Ntoxp0XYqYNNw== X-Google-Smtp-Source: AGHT+IHBg+8SKFvmuCSdBtCKMO3zdPpfz+9zxTmxyRiB8BtQnnc9GCQbP1NqRobr+dIWTtWWlSx+ X-Received: by 2002:a50:bae3:0:b0:56c:18d5:1e27 with SMTP id x90-20020a50bae3000000b0056c18d51e27mr8219491ede.5.1712659415620; Tue, 09 Apr 2024 03:43:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712659415; cv=pass; d=google.com; s=arc-20160816; b=NhOtLNbcT9TVcCEUQlGCwYpEJoWTrnBIMoJlJ4i+bp1L/vqR52ppkjYxDssptKtEEm Pkl5fjqrMpgYxVeSSWnllBN1DlQRWRQ86Q52+qwZFqKN6Lk2GUYLlpaJ1xFw6EVW3PNJ D1CXdcQa2t1iUzZ1Re9wYYDvAojfbdOZbGUhPqaaHsONLfwuXVnSimlHuM87FczbfiD3 0Hc3Bi2bDW8m1Iu76zwUcj3Ycv+Rjm7w+kIrV9RPUEttZGQH8c5IBOpH7jo5NF+n3ovw Uj/gMxQPuViTrA0rWuyTwNj6xkPem/cM1F1cg5sJMfOSBbuxFxkL02KAX1753fN5zgvn mlUQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:message-id:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:subject:date :from:dkim-signature; bh=LJ7AI3e7SSACkuJGvFG6mBp/k0J6gBrBtcHJqi2uTnk=; fh=gkWt+NiS4dzazu2PYLR84tG3Ab9OAbmxALf5Td9RmRQ=; b=bxJWKAby05wgN+EYZ/X656yyNKqfHPU9y+n8N6qai1vc8LNs9lWBh148Nnzc8YAenS OuPp9LyhPKMdhXKXE9q/yYghpKnfUMoYCr8tFZxqWLuvPbKDmDvYJKlbGxFtWr97KIw0 VoBvLAyFT/t2HVuFX9PelKCpMVsD6KThkkuPWoKoIfLZMNB6X2MUpbeCNMr43I3OQe4n GtosRZ7G04tYel6ZZ3F6rfcjpAp57yM63UW130euEkfWm1n60e6BTS8myUIoRUiFPm7J mAdizsGmzuHbUlS51HJHcL2f3HI/qCGe9SfsywsQGcypQA0eyHzBzzWLU1n4vkP7SdT1 vkhA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=q09RKB4R; arc=pass (i=1 spf=pass spfdomain=microchip.com dkim=pass dkdomain=microchip.com dmarc=pass fromdomain=microchip.com); spf=pass (google.com: domain of linux-kernel+bounces-136696-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136696-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microchip.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id en18-20020a056402529200b0056e5c00fba6si2031398edb.609.2024.04.09.03.43.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 03:43:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-136696-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=q09RKB4R; arc=pass (i=1 spf=pass spfdomain=microchip.com dkim=pass dkdomain=microchip.com dmarc=pass fromdomain=microchip.com); spf=pass (google.com: domain of linux-kernel+bounces-136696-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-136696-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=microchip.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id E06E61F24772 for ; Tue, 9 Apr 2024 10:43:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 541C18562E; Tue, 9 Apr 2024 10:42:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="q09RKB4R" Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id ACFF4839F1; Tue, 9 Apr 2024 10:42:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.154.123 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712659373; cv=none; b=qyCTQBWYozqbz6GkbfnrXH8jFM1ofFiKsHhx8OSJyDN9UtRAxx1Ng+u18biunIsiQLNJf/sGJHAu5ehsPTtiYQG7RvW4uQJS56KI1SZCafXWZ/3BxSd4+CEpCBYboHWFj/ZtImf0nuN1j9irYttVBSYIofN1FcFSM0FyUwSZ7LE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712659373; c=relaxed/simple; bh=zXZk78fX6ey/HH5mcDYS5WkqMHv4YbyQDlNsKpS0w5c=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:To:CC; b=m1puSGJF0lJ7BBczJ2kMRlGI1sGI7yCtlAiEmJbWNlwAUS0/7obdmhiwbSWVOsr35lvun5nGDY/JP4mibxrsPkNHom3zq7eYXAa+GWe9KGPOV9RHe+yIUhuU4bMU88Dmn/htCiPSe9//PKnlo9LnXeDzsqRaTX00XcttnKtMKKY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com; spf=pass smtp.mailfrom=microchip.com; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b=q09RKB4R; arc=none smtp.client-ip=68.232.154.123 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=microchip.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=microchip.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1712659371; x=1744195371; h=from:date:subject:mime-version:content-transfer-encoding: message-id:to:cc; bh=zXZk78fX6ey/HH5mcDYS5WkqMHv4YbyQDlNsKpS0w5c=; b=q09RKB4RrX1R6CGF8D5fJ/PP92c985X+D6omY00DDxsER/pNKh4DbvDK 00689esUIsTYUCse8tJa5myQqIVLkr7hIf2Ch9GtnKy7uSic4e2DLT+m7 wyXcoHNVwEGBErF3crDG8p7DOSgxuqRwcRwmWYsnaYshXckWUDqwg3ezT IG2vb1V45EOZdjIH0nv2qszbOwyxW466kwXtCT8cdhSL+DCyJki7WNecG E8JBkKLymjn0nu7ufUEoJyyIUNDs3dQiiKA8DtM9nuKdkWCEdpq4ePqTs vDbyGkwfo/cO72kWXfIpF24oed+ILto6qtArHZfP0CyJeQFzjEZRTw1O0 Q==; X-CSE-ConnectionGUID: aYh2mCPPSBCKJQPimdsGEw== X-CSE-MsgGUID: /BbIteXrSF+o5/uMVSDuLw== X-IronPort-AV: E=Sophos;i="6.07,189,1708412400"; d="scan'208";a="187446254" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa6.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 09 Apr 2024 03:42:45 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 9 Apr 2024 03:42:11 -0700 Received: from DEN-DL-M70577.microchip.com (10.10.85.11) by chn-vm-ex01.mchp-main.com (10.10.85.143) with Microsoft SMTP Server id 15.1.2507.35 via Frontend Transport; Tue, 9 Apr 2024 03:42:09 -0700 From: Daniel Machon Date: Tue, 9 Apr 2024 12:41:59 +0200 Subject: [PATCH net v2] net: sparx5: fix wrong config being used when reconfiguring PCS Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-ID: <20240409-link-mode-reconfiguration-fix-v2-1-db6a507f3627@microchip.com> X-B4-Tracking: v=1; b=H4sIAHYbFWYC/4WNQQ6CMBBFr0Jm7Zi2tERdcQ/DAssUJkpLWiQaw t1tegGX//3893dIFJkS3KodIm2cOPgc1KkCO/V+JOQhZ1BCaVELgy/2T5zDQBjJBu94fMd+zSt 0/MHBXRvpyBkjDGTHEinj4r+DpxW6DCdOa4jf8rnJUhW9/qvfJEq0Ul/Ew6paN307s43BTrycb ZihO47jB7PHJFHTAAAA To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Lars Povlsen , "Steen Hegelund" , , Bjarni Jonasson CC: , , , , "Steen Hegelund" , Daniel Machon X-Mailer: b4 0.14-dev The wrong port config is being used if the PCS is reconfigured. Fix this by correctly using the new config instead of the old one. Fixes: 946e7fd5053a ("net: sparx5: add port module support") Signed-off-by: Daniel Machon --- Changes in v2: - Rewrite subject and commit description - Link to v1: https://lore.kernel.org/r/20240405-link-mode-reconfiguration-fix-v1-1-c1480bc2346a@microchip.com --- drivers/net/ethernet/microchip/sparx5/sparx5_port.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_port.c b/drivers/net/ethernet/microchip/sparx5/sparx5_port.c index 3a1b1a1f5a19..60dd2fd603a8 100644 --- a/drivers/net/ethernet/microchip/sparx5/sparx5_port.c +++ b/drivers/net/ethernet/microchip/sparx5/sparx5_port.c @@ -731,7 +731,7 @@ static int sparx5_port_pcs_low_set(struct sparx5 *sparx5, bool sgmii = false, inband_aneg = false; int err; - if (port->conf.inband) { + if (conf->inband) { if (conf->portmode == PHY_INTERFACE_MODE_SGMII || conf->portmode == PHY_INTERFACE_MODE_QSGMII) inband_aneg = true; /* Cisco-SGMII in-band-aneg */ @@ -948,7 +948,7 @@ int sparx5_port_pcs_set(struct sparx5 *sparx5, if (err) return -EINVAL; - if (port->conf.inband) { + if (conf->inband) { /* Enable/disable 1G counters in ASM */ spx5_rmw(ASM_PORT_CFG_CSC_STAT_DIS_SET(high_speed_dev), ASM_PORT_CFG_CSC_STAT_DIS, --- base-commit: 1c25fe9a044d5334153a3585754b26553f8287b9 change-id: 20240305-link-mode-reconfiguration-fix-df961fef5505 Best regards, -- Daniel Machon