From: Daniel Golle <daniel@makrotopia.org>
To: Frank Wunderlich <frank-w@public-files.de>
Cc: "Russell King (Oracle)" <linux@armlinux.org.uk>,
"Andrew Lunn" <andrew@lunn.ch>,
"Heiner Kallweit" <hkallweit1@gmail.com>,
"Arınç ÜNAL" <arinc.unal@arinc9.com>,
"David Woodhouse" <dwmw@amazon.co.uk>,
"AngeloGioacchino Del Regno"
<angelogioacchino.delregno@collabora.com>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Felix Fietkau" <nbd@nbd.name>,
"Jakub Kicinski" <kuba@kernel.org>,
"John Crispin" <john@phrozen.org>,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org,
"Lorenzo Bianconi" <lorenzo@kernel.org>,
"Mark Lee" <Mark-MC.Lee@mediatek.com>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
netdev@vger.kernel.org, "Paolo Abeni" <pabeni@redhat.com>,
"Sean Wang" <sean.wang@mediatek.com>
Subject: Re: Aw: Re: [PATCH net-next 0/4] Remove legacy phylink behaviour
Date: Sat, 22 Jul 2023 13:43:07 +0100 [thread overview]
Message-ID: <ZLvO2_OCBO53oS5c@makrotopia.org> (raw)
In-Reply-To: <trinity-d3292c8a-89e4-4d5e-838f-cdf1f65ff58b-1690029105348@3c-app-gmx-bs12>
On Sat, Jul 22, 2023 at 02:31:45PM +0200, Frank Wunderlich wrote:
> Hi
>
> > Gesendet: Samstag, 22. Juli 2023 um 00:40 Uhr
> > Von: "Daniel Golle" <daniel@makrotopia.org>
> >
> > Hi Russell,
> >
> > On Fri, Jul 21, 2023 at 12:33:52PM +0100, Russell King (Oracle) wrote:
> > > Hi,
> > >
> > > This series removes the - as far as I can tell - unreachable code in
> > > mtk_eth_soc that relies upon legacy phylink behaviour, and then removes
> > > the support in phylink for this legacy behaviour.
> > >
> > > Patch 1 removes the clocking configuration from mtk_eth_soc for non-
> > > TRGMII, non-serdes based interface modes, and disables those interface
> > > modes prior to phylink configuration.
> > >
> > > Patch 2 removes the mac_pcs_get_state() method from mtk_eth_soc which
> > > I believe is also not used - mtk_eth_soc appears not to be used with
> > > SFPs (which would use a kind of in-band mode) nor does any DT appear
> > > to specify in-band mode for any non-serdes based interface mode.
> > >
> > > With both of those dealt with, the kernel is now free of any driver
> > > relying on the phylink legacy mode. Therefore, patch 3 removes support
> > > for this.
> > >
> > > Finally, with the advent of a new driver being submitted today that
> > > makes use of state->speed in the mac_config() path, patch 4 ensures that
> > > any phylink_link_state member that should not be used in mac_config is
> > > either cleared or set to an invalid value.
> >
> > Thank you for taking care of this!
>
> > For the whole series:
> >
> > Reviewed-by: Daniel Golle <daniel@makrotopia.org>
> > Tested-by: Daniel Golle <daniel@makrotopia.org>
> >
> > Tested on BPi-R2 (MT7623N), BPi-R3 (MT7986A) and BPi-R64 (MT7622A).
> > All works fine as expected.
>
> have you changed anything?
>
> in my test with bpi-r2 i see boot hangs after link-up on my wan-port (still trgmii-mode configured), no access to userspace.
>
> [ 10.881844] mtk_soc_eth 1b100000.ethernet eth0: configuring for fixed/trgmii link mode
> [ 10.891611] mtk_soc_eth 1b100000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
> [ 11.005814] mt7530-mdio mdio-bus:1f wan: configuring for phy/gmii link mode
> [ 11.016654] mt7530-mdio mdio-bus:1f lan3: configuring for phy/gmii link mode
> [ 11.025685] mt7530-mdio mdio-bus:1f lan2: configuring for phy/gmii link mode
> [ 11.035122] mt7530-mdio mdio-bus:1f lan1: configuring for phy/gmii link mode
> [ 11.045370] mt7530-mdio mdio-bus:1f lan0: configuring for phy/gmii link mode
>
> [ 15.144255] mt7530-mdio mdio-bus:1f wan: Link is Up - 1Gbps/Full - flow control rx/tx
>
> removing the cable does not show link down so it looks like completely stalled...but also no panic/crash or similar.
> When booting without cable it hangs too (without the up-message of course).
>
> > To apply the series I needed to resolve a minor conflict due to
> > net: ethernet: mtk_ppe: add MTK_FOE_ENTRY_V{1,2}_SIZE macros
> > being applied in the meantime.
>
> i used yesterdays net-next (6.5-rc2) and put series on top (also needed to do one hunk of first patch manually) and
> then my defconfig,buildscript etc. maybe i miss anything?
I tested in a fairly similar way.
>
> afair trgmii is basicly rgmii only with higher clock-setting...and if this is dropped from mac-driver but switch is still using it it cannot work, but i'm sure you know this ;)
For TRGMII mode mtk_gmac0_rgmii_adjust behavior should not have changed,
only speed-dependent adjustments for RGMII have been dropped.
I also didn't not see such a problem when I was testing.
However, I guess in my case the MAC interface mode has already been
setup in hardware because I booted the board via TFTP, hence U-Boot
already took care of initializing everything, so that can also be
a reason why it worked fine for me.
WARNING: multiple messages have this Message-ID (diff)
From: Daniel Golle <daniel@makrotopia.org>
To: Frank Wunderlich <frank-w@public-files.de>
Cc: "Russell King (Oracle)" <linux@armlinux.org.uk>,
"Andrew Lunn" <andrew@lunn.ch>,
"Heiner Kallweit" <hkallweit1@gmail.com>,
"Arınç ÜNAL" <arinc.unal@arinc9.com>,
"David Woodhouse" <dwmw@amazon.co.uk>,
"AngeloGioacchino Del Regno"
<angelogioacchino.delregno@collabora.com>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Felix Fietkau" <nbd@nbd.name>,
"Jakub Kicinski" <kuba@kernel.org>,
"John Crispin" <john@phrozen.org>,
linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org,
"Lorenzo Bianconi" <lorenzo@kernel.org>,
"Mark Lee" <Mark-MC.Lee@mediatek.com>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
netdev@vger.kernel.org, "Paolo Abeni" <pabeni@redhat.com>,
"Sean Wang" <sean.wang@mediatek.com>
Subject: Re: Aw: Re: [PATCH net-next 0/4] Remove legacy phylink behaviour
Date: Sat, 22 Jul 2023 13:43:07 +0100 [thread overview]
Message-ID: <ZLvO2_OCBO53oS5c@makrotopia.org> (raw)
In-Reply-To: <trinity-d3292c8a-89e4-4d5e-838f-cdf1f65ff58b-1690029105348@3c-app-gmx-bs12>
On Sat, Jul 22, 2023 at 02:31:45PM +0200, Frank Wunderlich wrote:
> Hi
>
> > Gesendet: Samstag, 22. Juli 2023 um 00:40 Uhr
> > Von: "Daniel Golle" <daniel@makrotopia.org>
> >
> > Hi Russell,
> >
> > On Fri, Jul 21, 2023 at 12:33:52PM +0100, Russell King (Oracle) wrote:
> > > Hi,
> > >
> > > This series removes the - as far as I can tell - unreachable code in
> > > mtk_eth_soc that relies upon legacy phylink behaviour, and then removes
> > > the support in phylink for this legacy behaviour.
> > >
> > > Patch 1 removes the clocking configuration from mtk_eth_soc for non-
> > > TRGMII, non-serdes based interface modes, and disables those interface
> > > modes prior to phylink configuration.
> > >
> > > Patch 2 removes the mac_pcs_get_state() method from mtk_eth_soc which
> > > I believe is also not used - mtk_eth_soc appears not to be used with
> > > SFPs (which would use a kind of in-band mode) nor does any DT appear
> > > to specify in-band mode for any non-serdes based interface mode.
> > >
> > > With both of those dealt with, the kernel is now free of any driver
> > > relying on the phylink legacy mode. Therefore, patch 3 removes support
> > > for this.
> > >
> > > Finally, with the advent of a new driver being submitted today that
> > > makes use of state->speed in the mac_config() path, patch 4 ensures that
> > > any phylink_link_state member that should not be used in mac_config is
> > > either cleared or set to an invalid value.
> >
> > Thank you for taking care of this!
>
> > For the whole series:
> >
> > Reviewed-by: Daniel Golle <daniel@makrotopia.org>
> > Tested-by: Daniel Golle <daniel@makrotopia.org>
> >
> > Tested on BPi-R2 (MT7623N), BPi-R3 (MT7986A) and BPi-R64 (MT7622A).
> > All works fine as expected.
>
> have you changed anything?
>
> in my test with bpi-r2 i see boot hangs after link-up on my wan-port (still trgmii-mode configured), no access to userspace.
>
> [ 10.881844] mtk_soc_eth 1b100000.ethernet eth0: configuring for fixed/trgmii link mode
> [ 10.891611] mtk_soc_eth 1b100000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
> [ 11.005814] mt7530-mdio mdio-bus:1f wan: configuring for phy/gmii link mode
> [ 11.016654] mt7530-mdio mdio-bus:1f lan3: configuring for phy/gmii link mode
> [ 11.025685] mt7530-mdio mdio-bus:1f lan2: configuring for phy/gmii link mode
> [ 11.035122] mt7530-mdio mdio-bus:1f lan1: configuring for phy/gmii link mode
> [ 11.045370] mt7530-mdio mdio-bus:1f lan0: configuring for phy/gmii link mode
>
> [ 15.144255] mt7530-mdio mdio-bus:1f wan: Link is Up - 1Gbps/Full - flow control rx/tx
>
> removing the cable does not show link down so it looks like completely stalled...but also no panic/crash or similar.
> When booting without cable it hangs too (without the up-message of course).
>
> > To apply the series I needed to resolve a minor conflict due to
> > net: ethernet: mtk_ppe: add MTK_FOE_ENTRY_V{1,2}_SIZE macros
> > being applied in the meantime.
>
> i used yesterdays net-next (6.5-rc2) and put series on top (also needed to do one hunk of first patch manually) and
> then my defconfig,buildscript etc. maybe i miss anything?
I tested in a fairly similar way.
>
> afair trgmii is basicly rgmii only with higher clock-setting...and if this is dropped from mac-driver but switch is still using it it cannot work, but i'm sure you know this ;)
For TRGMII mode mtk_gmac0_rgmii_adjust behavior should not have changed,
only speed-dependent adjustments for RGMII have been dropped.
I also didn't not see such a problem when I was testing.
However, I guess in my case the MAC interface mode has already been
setup in hardware because I booted the board via TFTP, hence U-Boot
already took care of initializing everything, so that can also be
a reason why it worked fine for me.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-07-22 12:43 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-21 11:33 [PATCH net-next 0/4] Remove legacy phylink behaviour Russell King (Oracle)
2023-07-21 11:33 ` Russell King (Oracle)
2023-07-21 11:34 ` [PATCH net-next 1/4] net: ethernet: mtk_eth_soc: remove incorrect PLL configuration Russell King (Oracle)
2023-07-21 11:34 ` Russell King (Oracle)
2023-07-21 11:34 ` [PATCH net-next 2/4] net: ethernet: mtk_eth_soc: remove mac_pcs_get_state and modernise Russell King (Oracle)
2023-07-21 11:34 ` Russell King (Oracle)
2023-07-21 11:34 ` [PATCH net-next 3/4] net: phylink: strip out pre-March 2020 legacy code Russell King (Oracle)
2023-07-21 11:34 ` Russell King (Oracle)
2023-07-21 11:34 ` [PATCH net-next 4/4] net: phylink: explicitly invalidate link_state members in mac_config Russell King (Oracle)
2023-07-21 11:34 ` Russell King (Oracle)
2023-07-21 16:38 ` [PATCH net-next 0/4] Remove legacy phylink behaviour Russell King (Oracle)
2023-07-21 16:38 ` Russell King (Oracle)
2023-07-21 22:40 ` Daniel Golle
2023-07-21 22:40 ` Daniel Golle
2023-07-21 22:40 ` Daniel Golle
2023-07-22 12:31 ` Aw: " Frank Wunderlich
2023-07-22 12:31 ` Frank Wunderlich
2023-07-22 12:43 ` Daniel Golle [this message]
2023-07-22 12:43 ` Daniel Golle
2023-07-22 16:14 ` Russell King (Oracle)
2023-07-22 16:14 ` Russell King (Oracle)
2023-07-22 18:00 ` Aw: " Frank Wunderlich
2023-07-22 18:00 ` Frank Wunderlich
2023-07-22 19:40 ` Russell King (Oracle)
2023-07-22 19:40 ` Russell King (Oracle)
2023-07-22 20:32 ` [PATCH net-next 1/4] net: ethernet: mtk_eth_soc: remove incorrect PLL configuration Russell King (Oracle)
2023-07-22 20:32 ` Russell King (Oracle)
2023-07-22 20:32 ` [PATCH net-next 2/4] net: ethernet: mtk_eth_soc: remove mac_pcs_get_state and modernise Russell King (Oracle)
2023-07-22 20:32 ` Russell King (Oracle)
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=ZLvO2_OCBO53oS5c@makrotopia.org \
--to=daniel@makrotopia.org \
--cc=Mark-MC.Lee@mediatek.com \
--cc=andrew@lunn.ch \
--cc=angelogioacchino.delregno@collabora.com \
--cc=arinc.unal@arinc9.com \
--cc=davem@davemloft.net \
--cc=dwmw@amazon.co.uk \
--cc=edumazet@google.com \
--cc=frank-w@public-files.de \
--cc=hkallweit1@gmail.com \
--cc=john@phrozen.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux@armlinux.org.uk \
--cc=lorenzo@kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=nbd@nbd.name \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=sean.wang@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.