Message ID | a5b04dfa8256d8302f402545a51ac4c626fdba25.1706071272.git.daniel@makrotopia.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-36465-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2553:b0:103:945f:af90 with SMTP id p19csp786263dyi; Tue, 23 Jan 2024 21:18:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IGO5Vi4n0zMtC6vy7GVl1x6WxM8vo+70azGKzP9pDplNIVizFES0zfU0Up72P5XMM/KN7rP X-Received: by 2002:a05:6214:20a6:b0:683:815f:61f9 with SMTP id 6-20020a05621420a600b00683815f61f9mr2480411qvd.73.1706073503715; Tue, 23 Jan 2024 21:18:23 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706073503; cv=pass; d=google.com; s=arc-20160816; b=QeDGBtCpoOgPtzf/SUy+8yq53GXGSzbsJjJcn+QNwa9/fZW6Sy9c1BHIlFeszuesfz 53NcqkOdDIxZTXe67bJQ95nefyxSOAKozhGCBBe2yIO9zZK4TQl0Nr2zktRwHh9nFoUW WzqEs4amk7XA8BFjz0FisH9MVdrucbdWpnKAC55JW0y4hVJBmJ87IiA83nR7x1KhEckf WSwTPAabhttMPEqpbrf1HYHWnujV89RSZNNPqkShylSA30LwjqTbkQdL85PQILNMmSBn e6m2tjsuKEKdF9JZaNtTrVLQk+yIrYEEHeE6FzWr3Fn+qxHdAewktGykuBvRJOuMnGIJ 37Cg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-disposition:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:message-id:subject:cc:to:from:date; bh=XNiwvYR0sbKZZynRPIUFLzn9Wcb2cw2TWYiLCwpV8zQ=; fh=hKBU0hrtOSdLQMPa/Vr+1MsshUq0adi5jIXr2TUszko=; b=Ct3wL3PF3UW5FJRoVzGDndjYXlI/a6rZzSV3jIMtxIcDehkG6yIHuKLy7+GCXQcsSl 9m6fqX9nozLPaxeD3JgYiywaTTh0BsJzWtBXL7LSq1OJ3jtZubcv1AK5hvkRXCCjp3F3 ZJH1FQK+UibNJS5EjM0uXlBbmrrGWnTRYpMtxoCnsPJ65cJHD5rd3evXIN6M4XZega/E qSk4xP9AMqrRrnkVIgZwJTQitncRUd5IP1Nwuv/fF735nB6ZW5XKro9ifYWfOGad+9uA 1ImHQjK2WF+VntsTdQ1OQveBDX+TuvLqW9086cAM170nfqRtDt4ql/yUCjzdRWYz7922 pIYw== ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=makrotopia.org); spf=pass (google.com: domain of linux-kernel+bounces-36465-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-36465-ouuuleilei=gmail.com@vger.kernel.org" Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id o4-20020a05620a22c400b00781d55a24a1si9337977qki.221.2024.01.23.21.18.23 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Jan 2024 21:18:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-36465-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=makrotopia.org); spf=pass (google.com: domain of linux-kernel+bounces-36465-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-36465-ouuuleilei=gmail.com@vger.kernel.org" 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 80FF31C23687 for <ouuuleilei@gmail.com>; Wed, 24 Jan 2024 05:18:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2C13EF9FF; Wed, 24 Jan 2024 05:17:58 +0000 (UTC) Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) (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 E5B55DDD0; Wed, 24 Jan 2024 05:17:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.142.180.65 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706073476; cv=none; b=Fha3yk8saVAEAAQvyK3MgjROC7S7cLB+0wbZyr8QfDGvGwPQr9I9G9hPAUiv4sGkSFCZpg/G+Awz1bCBQAAv3DU5/Ir9mjBTQ6rC6lBGVBb041chy81GNtn8P/JH2gJ2WVHXtavkvR+2jC+mN9bIJ/jwu/aMDYmtCqeChS7Rdy4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706073476; c=relaxed/simple; bh=D4U+G3+No+qUuQObL6c1NR2hyUkPlZqGZyAIN1w4kis=; h=Date:From:To:Cc:Subject:Message-ID:MIME-Version:Content-Type: Content-Disposition; b=QkasSzyHwDHe5FeRJ6BerUnFDB5cB2qhYzYlsWBOpQ0N20ISLjat0QcwSDD4eTtkXW1tm1fIBn/NmTW2b8nIynH8oP756gpWjeHo8lcmoOV038XPGW9xa2iz175aFcqBktcEGr3FvUBQRL+C1ukyp4Wf2gB7NCGRWvxKEni4dzU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org; spf=pass smtp.mailfrom=makrotopia.org; arc=none smtp.client-ip=185.142.180.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=makrotopia.org Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.96.2) (envelope-from <daniel@makrotopia.org>) id 1rSVdj-00010p-1D; Wed, 24 Jan 2024 05:17:32 +0000 Date: Wed, 24 Jan 2024 05:17:25 +0000 From: Daniel Golle <daniel@makrotopia.org> To: =?utf-8?b?QXLEsW7DpyDDnE5BTA==?= <arinc.unal@arinc9.com>, Daniel Golle <daniel@makrotopia.org>, DENG Qingfang <dqfext@gmail.com>, Sean Wang <sean.wang@mediatek.com>, Andrew Lunn <andrew@lunn.ch>, Florian Fainelli <f.fainelli@gmail.com>, Vladimir Oltean <olteanv@gmail.com>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Matthias Brugger <matthias.bgg@gmail.com>, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Cc: John Crispin <john@phrozen.org> Subject: [PATCH net] net: dsa: mt7530: fix 10M/100M speed on MT7988 switch Message-ID: <a5b04dfa8256d8302f402545a51ac4c626fdba25.1706071272.git.daniel@makrotopia.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1788947730243000649 X-GMAIL-MSGID: 1788947730243000649 |
Series |
[net] net: dsa: mt7530: fix 10M/100M speed on MT7988 switch
|
|
Commit Message
Daniel Golle
Jan. 24, 2024, 5:17 a.m. UTC
Setup PMCR port register for actual speed and duplex on internally
connected PHYs of the MT7988 built-in switch. This fixes links with
speeds other than 1000M.
Fixes: ("110c18bfed414 net: dsa: mt7530: introduce driver for MT7988 built-in switch")
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
---
drivers/net/dsa/mt7530.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
Comments
On Wed, Jan 24, 2024 at 05:17:25AM +0000, Daniel Golle wrote: > Setup PMCR port register for actual speed and duplex on internally > connected PHYs of the MT7988 built-in switch. This fixes links with > speeds other than 1000M. > > Fixes: ("110c18bfed414 net: dsa: mt7530: introduce driver for MT7988 built-in switch") > Signed-off-by: Daniel Golle <daniel@makrotopia.org> > --- Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
On 24/01/2024 08:17, Daniel Golle wrote: > Setup PMCR port register for actual speed and duplex on internally > connected PHYs of the MT7988 built-in switch. This fixes links with > speeds other than 1000M. > > Fixes: ("110c18bfed414 net: dsa: mt7530: introduce driver for MT7988 built-in switch") > Signed-off-by: Daniel Golle <daniel@makrotopia.org> Acked-by: Arınç ÜNAL <arinc.unal@arinc9.com> I'm wondering why we manually set speed and duplex for these interface modes in the first place. I don't how it works for PHY_INTERFACE_MODE_INTERNAL but, at least for PHY_INTERFACE_MODE_TRGMII and 802.3z interfaces, phylink should already supply proper speed and duplex. Arınç
On Thu, Jan 25, 2024 at 12:49:19PM +0300, Arınç ÜNAL wrote: > On 24/01/2024 08:17, Daniel Golle wrote: > > Setup PMCR port register for actual speed and duplex on internally > > connected PHYs of the MT7988 built-in switch. This fixes links with > > speeds other than 1000M. > > > > Fixes: ("110c18bfed414 net: dsa: mt7530: introduce driver for MT7988 built-in switch") > > Signed-off-by: Daniel Golle <daniel@makrotopia.org> > > Acked-by: Arınç ÜNAL <arinc.unal@arinc9.com> > > I'm wondering why we manually set speed and duplex for these interface > modes in the first place. I don't how it works for > PHY_INTERFACE_MODE_INTERNAL but, at least for PHY_INTERFACE_MODE_TRGMII and > 802.3z interfaces, phylink should already supply proper speed and duplex. It's true that duplex should always be set to full-duplex already by phylink. However, speed could be 2500MBit/s (2500Base-X) or 2000MBit/s (?, TRGMII) and we yet need to program the PCR like if it was 1000MBit/s. Regarding the INTERNAL case: it was added by mistake. In case of MT7988, all ports of the switch are connected via INTERNAL links, however, the PHYs still need adjustment of the PCR register just like on all other MT753x switches and the CPU port is setup elsewhere anyway.
On 25.01.2024 19:18, Daniel Golle wrote: > On Thu, Jan 25, 2024 at 12:49:19PM +0300, Arınç ÜNAL wrote: >> On 24/01/2024 08:17, Daniel Golle wrote: >>> Setup PMCR port register for actual speed and duplex on internally >>> connected PHYs of the MT7988 built-in switch. This fixes links with >>> speeds other than 1000M. >>> >>> Fixes: ("110c18bfed414 net: dsa: mt7530: introduce driver for MT7988 built-in switch") >>> Signed-off-by: Daniel Golle <daniel@makrotopia.org> >> >> Acked-by: Arınç ÜNAL <arinc.unal@arinc9.com> >> >> I'm wondering why we manually set speed and duplex for these interface >> modes in the first place. I don't how it works for >> PHY_INTERFACE_MODE_INTERNAL but, at least for PHY_INTERFACE_MODE_TRGMII and >> 802.3z interfaces, phylink should already supply proper speed and duplex. > > It's true that duplex should always be set to full-duplex already by > phylink. However, speed could be 2500MBit/s (2500Base-X) or 2000MBit/s > (?, TRGMII) and we yet need to program the PCR like if it was > 1000MBit/s. > > Regarding the INTERNAL case: it was added by mistake. In case of > MT7988, all ports of the switch are connected via INTERNAL links, > however, the PHYs still need adjustment of the PCR register just like > on all other MT753x switches and the CPU port is setup elsewhere > anyway. It's not necessarily PHYs needing adjustment of the port MAC control register. After reset, speed, duplex mode, etc. will be determined by polling the PHY connected to the switch MAC. We're forcing these properties on the PMCR because we're also configuring switch MACs that are not connected to PHYs, meaning the switch cannot determine these properties by polling a PHY. From what I understand, this code block is for overriding the speed and duplex variables to make the operations on the PMCR below work. It seems that this is actually only useful for PHY_INTERFACE_MODE_2500BASEX. PHY_INTERFACE_MODE_TRGMII is given SPEED_1000 by drivers/net/phy/phylink.c:phylink_interface_max_speed(). PHY_INTERFACE_MODE_2500BASEX is given SPEED_2500. Overriding the duplex variable looks unnecessary. Your patch here doesn't affect CPU ports because MT7531 and MT7988 PMCRs are configured with cpu_port_config before mt753x_phylink_mac_link_up(), and PHY_INTERFACE_MODE_INTERNAL is not used for MT7530 which, for MT7530, PMCRs will be set only on mt753x_phylink_mac_link_up(). PMCR_FORCE_SPEED_1000 is set on cpu_port_config. If someone were to get rid of cpu_port_config because of its utter uselessness, PMCR_FORCE_SPEED_1000 would not be set, causing the link between port 6 MAC and SoC MAC to break. In conclusion, I will add "case SPEED_10000:" to the operations where the speed and EEE bits are set on my patch for getting rid of cpu_port_config. Arınç
On Fri, Jan 26, 2024 at 01:44:57AM +0300, Arınç ÜNAL wrote: > On 25.01.2024 19:18, Daniel Golle wrote: > > On Thu, Jan 25, 2024 at 12:49:19PM +0300, Arınç ÜNAL wrote: > > > On 24/01/2024 08:17, Daniel Golle wrote: > > > > Setup PMCR port register for actual speed and duplex on internally > > > > connected PHYs of the MT7988 built-in switch. This fixes links with > > > > speeds other than 1000M. > > > > > > > > Fixes: ("110c18bfed414 net: dsa: mt7530: introduce driver for MT7988 built-in switch") > > > > Signed-off-by: Daniel Golle <daniel@makrotopia.org> > > > > > > Acked-by: Arınç ÜNAL <arinc.unal@arinc9.com> > > > > > > I'm wondering why we manually set speed and duplex for these interface > > > modes in the first place. I don't how it works for > > > PHY_INTERFACE_MODE_INTERNAL but, at least for PHY_INTERFACE_MODE_TRGMII and > > > 802.3z interfaces, phylink should already supply proper speed and duplex. > > > > It's true that duplex should always be set to full-duplex already by > > phylink. However, speed could be 2500MBit/s (2500Base-X) or 2000MBit/s > > (?, TRGMII) and we yet need to program the PCR like if it was > > 1000MBit/s. > > > > Regarding the INTERNAL case: it was added by mistake. In case of > > MT7988, all ports of the switch are connected via INTERNAL links, > > however, the PHYs still need adjustment of the PCR register just like > > on all other MT753x switches and the CPU port is setup elsewhere > > anyway. > > It's not necessarily PHYs needing adjustment of the port MAC control > register. It's not the PHYs which need adjustment but the MAC PMCR register which does. > After reset, speed, duplex mode, etc. will be determined by polling > the PHY connected to the switch MAC. Yes, but as it is a DSA driver we don't use **hardware** PHY polling and keep that off. Instead, PHY interrupts or software PHY polling is used to have Linux determine the link properties. We're then forcing these properties on the MAC port of the switch. > on the PMCR because we're also configuring switch MACs that are not > connected to PHYs, meaning the switch cannot determine these properties by > polling a PHY. The switch **never** determines these properties itself when using the DSA driver. It has a facility to do so, and yes, when accessing Ethernet in U-Boot or when using the 'swconfig'-based driver then this facility is used. But, I repeat, when using DSA we do not use hardware PHY polling. We poll (or rather: react to interrupts) in software instead. > > From what I understand, this code block is for overriding the speed and > duplex variables to make the operations on the PMCR below work. It seems > that this is actually only useful for PHY_INTERFACE_MODE_2500BASEX. > PHY_INTERFACE_MODE_TRGMII is given SPEED_1000 by > drivers/net/phy/phylink.c:phylink_interface_max_speed(). > PHY_INTERFACE_MODE_2500BASEX is given SPEED_2500. Overriding the duplex > variable looks unnecessary. > > Your patch here doesn't affect CPU ports because MT7531 and MT7988 PMCRs This patch does not intend to affect the CPU port. As I've already said in my previous reply "[...] the CPU port is setup elsewhere anyway." Maybe it wasn't clear, but I meant that the CPU port settings are intentionally unaffected by this patch. It is intended to affect user ports which with phy-mode = "internal"; set in DTS -- here we **do** need to set PMCR according the external link speed and duplex. > are configured with cpu_port_config before mt753x_phylink_mac_link_up(), > and PHY_INTERFACE_MODE_INTERNAL is not used for MT7530 which, for MT7530, > PMCRs will be set only on mt753x_phylink_mac_link_up(). > > PMCR_FORCE_SPEED_1000 is set on cpu_port_config. If someone were to get rid > of cpu_port_config because of its utter uselessness, PMCR_FORCE_SPEED_1000 > would not be set, causing the link between port 6 MAC and SoC MAC to break. > > In conclusion, I will add "case SPEED_10000:" to the operations where the > speed and EEE bits are set on my patch for getting rid of cpu_port_config. PMCR needs to be set according to actual link speed for built-in TP PHYs. This is true for all mt7530 variants including MT7988. Maybe the confusion here is that on MT7988 we use 'internal' phy-mode for both, the switch CPU port's link to mtk_eth_soc gmac0 as well as the links to the 4 built-in 1GE switch PHYs. The latter were affected by wrongly overriding speed and duplex in case phy-mode is set to "internal", which should not have been put there (by me) in first place. Let's just remove it, ok?
On 26.01.2024 02:57, Daniel Golle wrote: > On Fri, Jan 26, 2024 at 01:44:57AM +0300, Arınç ÜNAL wrote: >> On 25.01.2024 19:18, Daniel Golle wrote: >>> On Thu, Jan 25, 2024 at 12:49:19PM +0300, Arınç ÜNAL wrote: >>>> On 24/01/2024 08:17, Daniel Golle wrote: >>>>> Setup PMCR port register for actual speed and duplex on internally >>>>> connected PHYs of the MT7988 built-in switch. This fixes links with >>>>> speeds other than 1000M. >>>>> >>>>> Fixes: ("110c18bfed414 net: dsa: mt7530: introduce driver for MT7988 built-in switch") >>>>> Signed-off-by: Daniel Golle <daniel@makrotopia.org> >>>> >>>> Acked-by: Arınç ÜNAL <arinc.unal@arinc9.com> >>>> >>>> I'm wondering why we manually set speed and duplex for these interface >>>> modes in the first place. I don't how it works for >>>> PHY_INTERFACE_MODE_INTERNAL but, at least for PHY_INTERFACE_MODE_TRGMII and >>>> 802.3z interfaces, phylink should already supply proper speed and duplex. >>> >>> It's true that duplex should always be set to full-duplex already by >>> phylink. However, speed could be 2500MBit/s (2500Base-X) or 2000MBit/s >>> (?, TRGMII) and we yet need to program the PCR like if it was >>> 1000MBit/s. >>> >>> Regarding the INTERNAL case: it was added by mistake. In case of >>> MT7988, all ports of the switch are connected via INTERNAL links, >>> however, the PHYs still need adjustment of the PCR register just like >>> on all other MT753x switches and the CPU port is setup elsewhere >>> anyway. >> >> It's not necessarily PHYs needing adjustment of the port MAC control >> register. > > It's not the PHYs which need adjustment but the MAC PMCR register which > does. > >> After reset, speed, duplex mode, etc. will be determined by polling >> the PHY connected to the switch MAC. > > Yes, but as it is a DSA driver we don't use **hardware** PHY polling > and keep that off. Instead, PHY interrupts or software PHY polling is > used to have Linux determine the link properties. > We're then forcing these properties on the MAC port of the switch. > >> on the PMCR because we're also configuring switch MACs that are not >> connected to PHYs, meaning the switch cannot determine these properties by >> polling a PHY. > > The switch **never** determines these properties itself when using the > DSA driver. It has a facility to do so, and yes, when accessing > Ethernet in U-Boot or when using the 'swconfig'-based driver then this > facility is used. But, I repeat, when using DSA we do not use hardware > PHY polling. We poll (or rather: react to interrupts) in software > instead. > >> >> From what I understand, this code block is for overriding the speed and >> duplex variables to make the operations on the PMCR below work. It seems >> that this is actually only useful for PHY_INTERFACE_MODE_2500BASEX. >> PHY_INTERFACE_MODE_TRGMII is given SPEED_1000 by >> drivers/net/phy/phylink.c:phylink_interface_max_speed(). >> PHY_INTERFACE_MODE_2500BASEX is given SPEED_2500. Overriding the duplex >> variable looks unnecessary. >> >> Your patch here doesn't affect CPU ports because MT7531 and MT7988 PMCRs > > This patch does not intend to affect the CPU port. As I've already > said in my previous reply "[...] the CPU port is setup elsewhere > anyway." > > Maybe it wasn't clear, but I meant that the CPU port settings are > intentionally unaffected by this patch. > > It is intended to affect user ports which with phy-mode = "internal"; > set in DTS -- here we **do** need to set PMCR according the external > link speed and duplex. > > >> are configured with cpu_port_config before mt753x_phylink_mac_link_up(), >> and PHY_INTERFACE_MODE_INTERNAL is not used for MT7530 which, for MT7530, >> PMCRs will be set only on mt753x_phylink_mac_link_up(). >> >> PMCR_FORCE_SPEED_1000 is set on cpu_port_config. If someone were to get rid >> of cpu_port_config because of its utter uselessness, PMCR_FORCE_SPEED_1000 >> would not be set, causing the link between port 6 MAC and SoC MAC to break. >> >> In conclusion, I will add "case SPEED_10000:" to the operations where the >> speed and EEE bits are set on my patch for getting rid of cpu_port_config. > > PMCR needs to be set according to actual link speed for built-in TP > PHYs. This is true for all mt7530 variants including MT7988. > > Maybe the confusion here is that on MT7988 we use 'internal' phy-mode > for both, the switch CPU port's link to mtk_eth_soc gmac0 as well as > the links to the 4 built-in 1GE switch PHYs. > > The latter were affected by wrongly overriding speed and duplex in > case phy-mode is set to "internal", which should not have been put > there (by me) in first place. > > Let's just remove it, ok? I don't see anything I disagree with on your reply. I've made my response to explain what I understand and how I will adapt my future changes accordingly with this patch so as to prevent introducing another issue. I've already acknowledged this patch! Arınç
Hello: This patch was applied to netdev/net.git (main) by Jakub Kicinski <kuba@kernel.org>: On Wed, 24 Jan 2024 05:17:25 +0000 you wrote: > Setup PMCR port register for actual speed and duplex on internally > connected PHYs of the MT7988 built-in switch. This fixes links with > speeds other than 1000M. > > Fixes: ("110c18bfed414 net: dsa: mt7530: introduce driver for MT7988 built-in switch") > Signed-off-by: Daniel Golle <daniel@makrotopia.org> > > [...] Here is the summary with links: - [net] net: dsa: mt7530: fix 10M/100M speed on MT7988 switch https://git.kernel.org/netdev/net/c/dfa988b4c7c3 You are awesome, thank you!
diff --git a/drivers/net/dsa/mt7530.c b/drivers/net/dsa/mt7530.c index f8ecc354630b0..fbd52ff7cbd6e 100644 --- a/drivers/net/dsa/mt7530.c +++ b/drivers/net/dsa/mt7530.c @@ -2843,8 +2843,7 @@ static void mt753x_phylink_mac_link_up(struct dsa_switch *ds, int port, /* MT753x MAC works in 1G full duplex mode for all up-clocked * variants. */ - if (interface == PHY_INTERFACE_MODE_INTERNAL || - interface == PHY_INTERFACE_MODE_TRGMII || + if (interface == PHY_INTERFACE_MODE_TRGMII || (phy_interface_mode_is_8023z(interface))) { speed = SPEED_1000; duplex = DUPLEX_FULL;