From: Daniel Golle <daniel@makrotopia•org>
To: "Russell King (Oracle)" <linux@armlinux•org.uk>
Cc: netdev@vger•kernel.org, linux-mediatek@lists•infradead.org,
linux-arm-kernel@lists•infradead.org,
linux-kernel@vger•kernel.org,
"Heiner Kallweit" <hkallweit1@gmail•com>,
"Lorenzo Bianconi" <lorenzo@kernel•org>,
"Mark Lee" <Mark-MC.Lee@mediatek•com>,
"John Crispin" <john@phrozen•org>, "Felix Fietkau" <nbd@nbd•name>,
"AngeloGioacchino Del Regno"
<angelogioacchino.delregno@collabora•com>,
"Matthias Brugger" <matthias.bgg@gmail•com>,
"DENG Qingfang" <dqfext@gmail•com>,
"Landen Chao" <Landen.Chao@mediatek•com>,
"Sean Wang" <sean.wang@mediatek•com>,
"Paolo Abeni" <pabeni@redhat•com>,
"Jakub Kicinski" <kuba@kernel•org>,
"Eric Dumazet" <edumazet@google•com>,
"David S. Miller" <davem@davemloft•net>,
"Vladimir Oltean" <olteanv@gmail•com>,
"Florian Fainelli" <f.fainelli@gmail•com>,
"Andrew Lunn" <andrew@lunn•ch>,
"Jianhui Zhao" <zhaojh329@gmail•com>,
"Bjørn Mork" <bjorn@mork•no>
Subject: Re: [PATCH v2 11/11] net: dsa: mt7530: use external PCS driver
Date: Fri, 10 Feb 2023 22:17:15 +0000 [thread overview]
Message-ID: <Y+bCa7ekrREOpgid@makrotopia.org> (raw)
In-Reply-To: <Y+Yi+ajKHaLo4Vvq@shell.armlinux.org.uk>
On Fri, Feb 10, 2023 at 10:56:57AM +0000, Russell King (Oracle) wrote:
> On Tue, Feb 07, 2023 at 02:24:17PM +0000, Daniel Golle wrote:
> > @@ -2728,11 +2612,11 @@ mt753x_phylink_mac_select_pcs(struct dsa_switch *ds, int port,
> >
> > switch (interface) {
> > case PHY_INTERFACE_MODE_TRGMII:
> > + return &priv->pcs[port].pcs;
> > case PHY_INTERFACE_MODE_SGMII:
> > case PHY_INTERFACE_MODE_1000BASEX:
> > case PHY_INTERFACE_MODE_2500BASEX:
> > - return &priv->pcs[port].pcs;
> > -
> > + return priv->ports[port].sgmii_pcs;
>
> My only concern here is that we also use the PCS when in TRGMII mode in
> this driver, but the mtk pcs code from mtk_eth_soc doesn't handle
> TRGMII (and getting the link timer will fail for this mode, causing
> the pcs_config() method to fail.)
>
> Thus, this driver will stop working in TRGMII mode.
I've just built and tested this on MT7623 BPi-R2 board with MT7530
connnected to SoC via TRGMII and observed that it all works fine.
However, on this platform we could safe some bytes by still allowing
mt7530.c to be built without pcs-mtk-lynxi which isn't used on MT7623
by either the ethernet or the switch driver.
To me this is not a priority, and doing that would involve adding some
ifdef'ery which isn't really nice. However, if anyone has a strong
opinion in favor of allowing mt7530.c (or even mtk_eth_soc) to be built
without pcs-mtk-lynxi, let me know and I will make the necessary
changes.
prev parent reply other threads:[~2023-02-10 22:17 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-07 14:18 [PATCH v2 00/11] net: ethernet: mtk_eth_soc: various enhancements Daniel Golle
2023-02-07 14:18 ` [PATCH v2 01/11] net: ethernet: mtk_eth_soc: add support for MT7981 SoC Daniel Golle
2023-02-07 14:19 ` [PATCH v2 02/11] dt-bindings: net: mediatek,net: add mt7981-eth binding Daniel Golle
2023-02-07 17:36 ` Krzysztof Kozlowski
2023-02-07 14:19 ` [PATCH v2 03/11] dt-bindings: arm: mediatek: add 'mediatek,pn_swap' property Daniel Golle
2023-02-07 17:38 ` Krzysztof Kozlowski
2023-02-07 18:00 ` Daniel Golle
2023-02-08 9:32 ` Krzysztof Kozlowski
2023-02-08 13:51 ` Daniel Golle
2023-02-08 20:08 ` Krzysztof Kozlowski
2023-02-08 22:30 ` Daniel Golle
2023-02-09 11:30 ` Krzysztof Kozlowski
2023-02-10 10:34 ` Russell King (Oracle)
2023-02-10 12:23 ` Russell King (Oracle)
2023-02-10 12:35 ` Krzysztof Kozlowski
2023-02-10 10:30 ` Russell King (Oracle)
2023-02-07 14:20 ` [PATCH v2 04/11] net: ethernet: mtk_eth_soc: set MDIO bus clock frequency Daniel Golle
2023-02-07 17:07 ` Andrew Lunn
2023-02-07 14:21 ` [PATCH v2 05/11] net: ethernet: mtk_eth_soc: reset PCS state Daniel Golle
2023-02-10 10:36 ` Russell King (Oracle)
2023-02-07 14:21 ` [PATCH v2 06/11] net: ethernet: mtk_eth_soc: only write values if needed Daniel Golle
2023-02-10 10:38 ` Russell King (Oracle)
2023-02-07 14:22 ` [PATCH v2 07/11] net: ethernet: mtk_eth_soc: fix RX data corruption issue Daniel Golle
2023-02-07 14:22 ` [PATCH v2 08/11] net: ethernet: mtk_eth_soc: ppe: add support for flow accounting Daniel Golle
2023-02-07 14:23 ` [PATCH v2 09/11] net: pcs: add driver for MediaTek SGMII PCS Daniel Golle
2023-02-10 10:50 ` Russell King (Oracle)
2023-02-07 14:23 ` [PATCH v2 10/11] net: ethernet: mtk_eth_soc: switch to external PCS driver Daniel Golle
2023-02-07 14:30 ` Daniel Golle
2023-02-07 14:24 ` [PATCH v2 11/11] net: dsa: mt7530: use " Daniel Golle
2023-02-10 10:56 ` Russell King (Oracle)
2023-02-10 12:52 ` Daniel Golle
2023-02-10 22:17 ` Daniel Golle [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y+bCa7ekrREOpgid@makrotopia.org \
--to=daniel@makrotopia$(echo .)org \
--cc=Landen.Chao@mediatek$(echo .)com \
--cc=Mark-MC.Lee@mediatek$(echo .)com \
--cc=andrew@lunn$(echo .)ch \
--cc=angelogioacchino.delregno@collabora$(echo .)com \
--cc=bjorn@mork$(echo .)no \
--cc=davem@davemloft$(echo .)net \
--cc=dqfext@gmail$(echo .)com \
--cc=edumazet@google$(echo .)com \
--cc=f.fainelli@gmail$(echo .)com \
--cc=hkallweit1@gmail$(echo .)com \
--cc=john@phrozen$(echo .)org \
--cc=kuba@kernel$(echo .)org \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-mediatek@lists$(echo .)infradead.org \
--cc=linux@armlinux$(echo .)org.uk \
--cc=lorenzo@kernel$(echo .)org \
--cc=matthias.bgg@gmail$(echo .)com \
--cc=nbd@nbd$(echo .)name \
--cc=netdev@vger$(echo .)kernel.org \
--cc=olteanv@gmail$(echo .)com \
--cc=pabeni@redhat$(echo .)com \
--cc=sean.wang@mediatek$(echo .)com \
--cc=zhaojh329@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox