netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFC net-next 0/4] Various mtk_eth_soc cleanups
@ 2023-02-24 12:35 Russell King (Oracle)
  2023-02-24 12:36 ` [PATCH RFC net-next 1/4] net: mtk_eth_soc: tidy mtk_gmac0_rgmii_adjust() Russell King (Oracle)
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Russell King (Oracle) @ 2023-02-24 12:35 UTC (permalink / raw)
  To: Daniel Golle
  Cc: AngeloGioacchino Del Regno, David S. Miller, Eric Dumazet,
	Felix Fietkau, Jakub Kicinski, John Crispin, linux-arm-kernel,
	linux-mediatek, Lorenzo Bianconi, Mark Lee, Matthias Brugger,
	netdev, Paolo Abeni, Sean Wang

Hi,

These are a number of patches that do a bit of cleanup to mtk_eth_soc,
including one (the last) which seems to indicate that I somehow missed
adding RMII and REVMII to the supported_interfaces - but no one has
complained, and checking the DT files in the kernel, no one uses these
modes (so the driver is probably untested for these.)

The first patch cleans up mtk_gmac0_rgmii_adjust(), which is the
troublesome function preventing the driver becoming a post-March2020
phylink driver. It doesn't solve that problem, merely makes the code
easier to follow by getting rid of repeated tenary operators.

The second patch moves the check for DDR2 memory to the initialisation
of phylink's supported_interfaces - if TRGMII is not possible for some
reason, we should not be erroring out in phylink MAC operations when
that can be determined prior to phylink creation.

The third patch removes checks from mtk_mac_config() that are done
when initialising supported_interfaces - phylink will not call
mtk_mac_config() with an interface that was not marked as supported,
so these checks are redundant.

The last patch adds comments for REVMII and RMII. As I note, these
seem to be unused in the DT files, and as no one has reported that
these don't work, I suggest that no one uses them. Should we drop
support for these modes, or add them to supported_interfaces?

Please review, and I'll collect attributations for resending after
net-next has re-opened.

Thanks.

 drivers/net/ethernet/mediatek/mtk_eth_soc.c | 71 ++++++++++++++---------------
 1 file changed, 34 insertions(+), 37 deletions(-)

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2023-03-07 14:32 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-24 12:35 [PATCH RFC net-next 0/4] Various mtk_eth_soc cleanups Russell King (Oracle)
2023-02-24 12:36 ` [PATCH RFC net-next 1/4] net: mtk_eth_soc: tidy mtk_gmac0_rgmii_adjust() Russell King (Oracle)
2023-02-25 16:46   ` Simon Horman
2023-02-24 12:36 ` [PATCH RFC net-next 2/4] net: mtk_eth_soc: move trgmii ddr2 check to probe function Russell King (Oracle)
2023-02-25 16:47   ` Simon Horman
2023-02-24 12:36 ` [PATCH RFC net-next 3/4] net: mtk_eth_soc: remove unnecessary checks in mtk_mac_config() Russell King (Oracle)
2023-02-25 16:47   ` Simon Horman
2023-02-24 12:36 ` [PATCH RFC net-next 4/4] net: mtk_eth_soc: note interface modes not set in supported_interfaces Russell King (Oracle)
2023-02-25 16:49   ` Simon Horman
2023-02-25 19:11     ` Russell King (Oracle)
2023-02-25 20:28       ` Simon Horman
2023-03-07 12:01   ` Russell King (Oracle)
2023-03-07 13:25     ` Daniel Golle
2023-03-07 14:04       ` Russell King (Oracle)
2023-03-07 14:27         ` Daniel Golle

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).