Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp338278rdb; Tue, 23 Jan 2024 00:49:10 -0800 (PST) X-Google-Smtp-Source: AGHT+IGY8RkYehkTQyRCy7Fp+R2fRIgEZdNppCyDITmZ3iLaEMGUTltKtjaWD3XbVGqlKSGd2sWi X-Received: by 2002:a2e:3c0c:0:b0:2cd:6399:ab36 with SMTP id j12-20020a2e3c0c000000b002cd6399ab36mr2732528lja.16.1705999750240; Tue, 23 Jan 2024 00:49:10 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705999750; cv=pass; d=google.com; s=arc-20160816; b=zBwTopSbdvo2O9QZXZj5HKRTQg/JnLxQ1u+c9CV3SYLXL4qo+73duINd3diM3vRqyb krvPMRHDVgbyg0Ah5ae1WdP9sLi/hzUthRuAGPlvRDD5VwUFHo6aQ8kc57DA3GAenaCV edDEAww6bdmDqZxnGnx9L+qseEgdrf3yijeoj2s+dXh7bCnnSSSQZ4CHiHBlCaAgcnQi zw5Y7hHvD2f6opnPzONjk5okg0tGRPrT7OZ7Gq87TdDP/U2V2eXzAqiq2v/mBuWrk6Wq jjRF0ToO1zUtf3XxasI5PAJj3nrJ1SXQTPc1WVLGDQYjQ0M6x2kO7mAMnlcQ/AOqAnqZ /CKA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:organization:references :in-reply-to:message-id:subject:cc:to:from:date:dkim-signature; bh=m4Y70JmNATNTUUvhrItUodsxgvGUce4rjjN5KbaPrtU=; fh=CNwf89hmqfLLpCcvaYKAlXe7mwkEbO333XqSOohH5BM=; b=L50fVDKcWvYV4eR1R8Lg3lzZOVq/zOTi8hYn+6CmFCo7kYrd7A6tb5IiuVHm+JIj1+ llKxy652BNQBdafX2yL2w1Gn3uKDchV4YJlFq5+7A7ytbuTwayKGgJV+ZSCqAZJ7Dlg2 KPn/uGFw0otQm2mCKSmMWVkEEvdcw2BFmquJy+EsnhJdLayVYH/3cyW3lbvbtzoAOmwd syUfRrgL1Y1dK2n8qbM7QbZwtjmVCrbG8nnb0LK0wHfKVBiWuwIVH9kgrGpDBNHm68fL HRkcnYwxh9yy/zP4XCzBWBTuYiksi7ptm4dOai2K3wXShF+o99fFojZrbhWe6U0DnYBb CIGA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=YXBVpSK4; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-34936-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-34936-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.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 n18-20020a05640205d200b0055a61d3a7d8si4577113edx.108.2024.01.23.00.49.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 00:49:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-34936-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=@bootlin.com header.s=gm1 header.b=YXBVpSK4; arc=pass (i=1 spf=pass spfdomain=bootlin.com dkim=pass dkdomain=bootlin.com dmarc=pass fromdomain=bootlin.com); spf=pass (google.com: domain of linux-kernel+bounces-34936-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-34936-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.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 D64C51F2B632 for ; Tue, 23 Jan 2024 08:49:09 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 45A4C57313; Tue, 23 Jan 2024 08:49:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="YXBVpSK4" Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) (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 509E756450; Tue, 23 Jan 2024 08:48:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.200 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705999739; cv=none; b=MApQTQsIbovNGduNu/SDvFt1eOtwQU2lg/4Hx0C3i1FA1mYFlG8+ijrlCQPGUQloT6MLP7TuIBcDiYZIouEBjza5gxO9xb6u5G1SqWbI4xPx/NCJV84mhXXksE936fT+JLRAmpFhqZSExwBlNg8vMTlhmapO16HvGkY0/O399CQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705999739; c=relaxed/simple; bh=t2eee3p+5fYN3Cokye9kBeOsXjD6ww+E/52wz9ArAMo=; h=Date:From:To:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=h33dJf3gpDoSYs9wyc5fpfoz8DwkLsSQSESuHg9Zt3+cbcM/BENHpEPKftpkhXhJivD9GUwR7+QCdgHBHn/MkpB9RfTVwzFotkzxUpwO44SJ4l5Ky3urK9Jt6PGJGk3xVP7wgWRljQawuG64rw9DzrwrTR2SP+L3j20PV6Y46xc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=YXBVpSK4; arc=none smtp.client-ip=217.70.183.200 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Received: by mail.gandi.net (Postfix) with ESMTPSA id BF24620011; Tue, 23 Jan 2024 08:48:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1705999731; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=m4Y70JmNATNTUUvhrItUodsxgvGUce4rjjN5KbaPrtU=; b=YXBVpSK4YTRxCcvIlW+4GiBrR8mtfdKf9xzd5HHbttHWC969LXsxy5xvAbRTcNZ/TsOXnj GDGKDb3QRg9GpPxMu4D3LFX8PHhRCtjdlghGUblGGUclsmgNkGn+rR4Pkpo3QtSeeHqKxJ VznDgeqOfyTdO44lfHQQywdWnVOZXoaNvooOjrOzLEVGONG3I52fvWkpkOYBj4o3KWFEyy +7qlmvnYD2OS4Qdy7ex5XHO8A7JJrYDS+aAIUOM2o29rsDBD5LuVvvbzdn1acewUrF+mhm PsRoUf8NVQVr76HmKu+JV/m9pljp5AYmEtmEbucYooDyhzw5FrCbb5j+uhGosA== Date: Tue, 23 Jan 2024 09:48:49 +0100 From: Maxime Chevallier To: Horatiu Vultur Cc: , , , , , , Subject: Re: [PATCH net] net: lan966x: Fix port configuration when using SGMII interface Message-ID: <20240123094849.5ce5acc8@device-28.home> In-Reply-To: <20240123081514.3625293-1-horatiu.vultur@microchip.com> References: <20240123081514.3625293-1-horatiu.vultur@microchip.com> Organization: Bootlin X-Mailer: Claws Mail 4.2.0 (GTK 3.24.39; x86_64-redhat-linux-gnu) 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=US-ASCII Content-Transfer-Encoding: 7bit X-GND-Sasl: maxime.chevallier@bootlin.com Hello Horatiu, 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. > */ > - 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