Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp371282rdb; Tue, 23 Jan 2024 02:11:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IG/Y/uQ5/+T39OQc0vx+Zm0Hp1s4WdJuzoOtwdHZXRI5LNYejn6OalmpYQy9DpwDg8tdZ8w X-Received: by 2002:a17:90a:43e1:b0:28e:7932:b9d1 with SMTP id r88-20020a17090a43e100b0028e7932b9d1mr2373899pjg.2.1706004712274; Tue, 23 Jan 2024 02:11:52 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706004712; cv=pass; d=google.com; s=arc-20160816; b=USlFw1a7McIHCXv7UKI2E0r4qe0TVVpZSotLoZpjyquy8eM0MJRQSlx6Mfwl/5iSGy G9KxPXkSFWvdaElwSTBxjEP1ufxCUBzd7nsEO9emDqbw+R57rUVWLS9HpLwso9FUmD/L 9wz3DONmB3wjl0VJHhdjgTg/WShQK+/NJ47AlnFZNn5rPsrxzFbAUIVqjuZHAPSgO8bl OUFQOyeUjABhDIdOtMosZLHvBp8g9Bkkf17dMJC8Ur/AcyFVedgfzOYqwoVwGz2XCok2 440ne2oESmkTQYBVguNrqBRgO2LxtdP68Ni+iN4F3i7fWOJeGSczafN5fuP+fFjLQK0s gbyA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=W1vY9If4guzi2kWnszHUpx55odHyIuSxy1SnuOLWr+U=; fh=etSDBVNO6yYAymDvHGjCsc5CovdTrfzRYibzxgmG7Ho=; b=CXLjooSIxzl6RfncLiAofN5LAK0RToPjtnTdYOZFJVt6emSfV5SIR5SfRQ8A6JcvhQ J+EnPsTm70euUTD9E7zJqzyYy1mNlLc8AfGvrRktWbBpO1s2Prc1mSCiqDkIEDLsZfMv xdDfVmDEUomnK/lA9tvKBUk4c4gB90+gTqfNhk6+kkvhD0SwteQneTBTaCEn3EyzRnGn 8j/7fQxa9/QnLhnB5UPltNZNh0aB/lo7sSI4ymc1piPe4WM96aY205bX4oY9gyT16VeF NdxFHxVb9ht+ZQXepaqVqZo+k6mxQMYqKwRBSHbYf4OQVoFV3vmLIlgfqfak0l7U4hhs si6w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b="Z7kK/SwE"; 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-35062-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35062-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=REJECT dis=NONE) header.from=microchip.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id k10-20020a17090a62ca00b0028b21dd5308si9626307pjs.37.2024.01.23.02.11.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 02:11:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-35062-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b="Z7kK/SwE"; 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-35062-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-35062-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 7549128F48F for ; Tue, 23 Jan 2024 10:03:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 7543D5A109; Tue, 23 Jan 2024 10:03:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="Z7kK/SwE" Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (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 DBE215C5E0; Tue, 23 Jan 2024 10:03:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=68.232.153.233 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706004224; cv=none; b=tjd2tLXU2LXmdn7zRIvjRANfFuZmF+WfHULXfMh7xXjGDSfMkk8fMThL3LEF0FQSSmgt0tzpz5JRKs8plFM16aQR+4aJq1DIf/QsqoqOeGT1p4GF65XIMrvCBfkFe3SgGJxJCBdO0r/Dfei/Wtx+fZ4toztYSkcFAfRa13tF+F8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706004224; c=relaxed/simple; bh=uMNNg+3njresSW14XlqPX2ISyI4rysroKuO5EzSZJcY=; h=Date:From:To:CC:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=RahRc0N1htZtGLSPO7LyywyV+QsDVfTxWPTOkuvJNPBeWd1RBv/crn20HKAXfBhZeuIb7/n6pJN9azDsnayxibhrQ/Hs3DgiiNeqRyDL45gCrJBo4M1juQOIpICZkEa2WmOcEbyzaN6K3z9YnrLYe4crG+Zich055AnqPSNrs9M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine 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=Z7kK/SwE; arc=none smtp.client-ip=68.232.153.233 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine 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=1706004222; x=1737540222; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=uMNNg+3njresSW14XlqPX2ISyI4rysroKuO5EzSZJcY=; b=Z7kK/SwECCIj2ufKU3bP/qE23MAuLlt4vwZL6bo5DMnyXp3Fh6Y7+WFG 5GKE/YvTMcXA7kDUht3QR3PB1MFtTa1PhVbAp4roBS+STAsVfTY37MS7B 0i8Ww0caTP4DRI6MZ76SbhRJy6/nqWXTrQJIRtgNqxOwJtNf2ON3xclrE x3QEg/X9RPhoKc0g9pPRvYnGYs8ddhw5XXdII2KKKJiuFbE8q2Pyc3RQ1 IuWUdT5C4qa3o6Kiha2PY9McQawEcQc+ejpl+Z1xftsRKkxP7X8J54atf gd76Yyg9iv11GeQVVPGf85c+cIeePbwAZborb1tAw9RnI74beLB1dGkoL A==; X-CSE-ConnectionGUID: RZ1Nz7WUS3Gi2FofoZ48Tg== X-CSE-MsgGUID: QLqhO3EaRo+fPgWiwCOc7w== X-IronPort-AV: E=Sophos;i="6.05,214,1701154800"; d="scan'208";a="15158519" X-Amp-Result: SKIPPED(no attachment in message) Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa3.microchip.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 23 Jan 2024 03:03:40 -0700 Received: from chn-vm-ex01.mchp-main.com (10.10.85.143) by chn-vm-ex04.mchp-main.com (10.10.85.152) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 23 Jan 2024 03:03:20 -0700 Received: from localhost (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, 23 Jan 2024 03:03:20 -0700 Date: Tue, 23 Jan 2024 11:03:19 +0100 From: Horatiu Vultur To: Maxime Chevallier CC: , , , , , , Subject: Re: [PATCH net] net: lan966x: Fix port configuration when using SGMII interface Message-ID: <20240123100319.3z6or2ahhztkplgv@DEN-DL-M31836.microchip.com> References: <20240123081514.3625293-1-horatiu.vultur@microchip.com> <20240123094849.5ce5acc8@device-28.home> 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-Disposition: inline In-Reply-To: <20240123094849.5ce5acc8@device-28.home> The 01/23/2024 09:48, Maxime Chevallier wrote: > > Hello Horatiu, Hi Maxime, > > On Tue, 23 Jan 2024 09:15:14 +0100 > Horatiu Vultur wrote: > > > In case the interface between the MAC and the PHY is SGMII, then the bit > > GIGA_MODE on the MAC side needs to be set regardless of the speed at > > which it is running. > > > > Fixes: d28d6d2e37d1 ("net: lan966x: add port module support") > > Signed-off-by: Horatiu Vultur > > --- > > drivers/net/ethernet/microchip/lan966x/lan966x_port.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_port.c b/drivers/net/ethernet/microchip/lan966x/lan966x_port.c > > index 92108d354051c..975a6d64a2e18 100644 > > --- a/drivers/net/ethernet/microchip/lan966x/lan966x_port.c > > +++ b/drivers/net/ethernet/microchip/lan966x/lan966x_port.c > > @@ -170,7 +170,8 @@ static void lan966x_port_link_up(struct lan966x_port *port) > > /* Also the GIGA_MODE_ENA(1) needs to be set regardless of the > > * port speed for QSGMII ports. > > Small nit, I think this comment above the test could also be updated to > reflect that change. Ah... yes, you are right. I will update this in the next version. > > > */ > > - if (phy_interface_num_ports(config->portmode) == 4) > > + if (phy_interface_num_ports(config->portmode) == 4 || > > + config->portmode == PHY_INTERFACE_MODE_SGMII) > > mode = DEV_MAC_MODE_CFG_GIGA_MODE_ENA_SET(1); > > > > lan_wr(config->duplex | mode, > > Besides that, > > Reviewed-by: Maxime Chevallier > > Thanks, > > Maxime -- /Horatiu