From: "Joris Vaišvila" <joey@tinyisr.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: netdev@vger.kernel.org, nbd@nbd.name, sean.wang@mediatek.com,
lorenzo@kernel.org, andrew+netdev@lunn.ch, davem@davemloft.net,
edumazet@google.com, pabeni@redhat.com
Subject: Re: [PATCH net-next v3] net: ethernet: mtk_eth_soc: avoid writing to ESW registers on MT7628
Date: Thu, 29 Jan 2026 08:22:40 +0200 [thread overview]
Message-ID: <aXrvPyNSkNSFTjR7@plutus> (raw)
In-Reply-To: <20260125133606.1257ff61@kernel.org>
> > +static void rt5350_mac_config(struct phylink_config *config, unsigned int mode,
> > + const struct phylink_link_state *state)
> > +{
> > +}
> > +
> > +static void rt5350_mac_link_down(struct phylink_config *config, unsigned int mode,
> > + phy_interface_t interface)
> > +{
> > +}
> > +
> > +static void rt5350_mac_link_up(struct phylink_config *config,
> > + struct phy_device *phy,
> > + unsigned int mode, phy_interface_t interface,
> > + int speed, int duplex, bool tx_pause, bool rx_pause)
> > +{
> > +}
>
> Is there any other driver that implements fixed link with phylink this
> way? I know regrettably little about phylink. I'd think that mac up/down
> usually would still do _something_.
>
`net/dsa/port.c` stubs are the only other place with no-op phylink mac
ops.
On MT7628, the existing `mtk_gdm_mac_link_up()` does not actually
commit any configuration to the MAC hardware. The only potentially
observable change is `mac->speed = speed`, however leaving that as
`UNKNOWN_SPEED` appears more accurate for this SoC, though I will
recheck for side-effects of that.
`mtk_mac_link_down()` also does not touch any valid MAC registers. Both
of these functions are already effectively no-ops in terms of MAC
configuration on this SoC. They only clobber unrelated ESW registers.
While the ESW block seems to provide a way to control the CPU port speed
and link state, this is a separate IP and I don't think it's appropriate
to have the MAC driver program it.
While I'm not very familiar with phylink either, this is no different
from how the original driver handles link up/down on this SoC.
prev parent reply other threads:[~2026-01-29 6:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-22 18:58 [PATCH net-next v3] net: ethernet: mtk_eth_soc: avoid writing to ESW registers on MT7628 Joris Vaisvila
2026-01-25 21:36 ` Jakub Kicinski
2026-01-29 6:22 ` Joris Vaišvila [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=aXrvPyNSkNSFTjR7@plutus \
--to=joey@tinyisr.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=lorenzo@kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox