DSA: request for your help with your DSA driver
Marek Behún
kabel at kernel.org
Tue Jul 5 05:22:36 PDT 2022
Hello guys,
this is a request for help/comments on the DSA drivers you have been
working on in Linux.
I am writing this e-mail because people don't seem to be responding to
RFC patches.
Basically Russell and I are trying to do some development on phylink +
DSA to move it forward, without breaking existing drivers:
- we want to make it so that phylink is always used for CPU and DSA
ports (needed for conversion to phylink_pcs)
- to do that, phylink needs to know the interface type to which the
port will be configure
- many drivers don't report that information now:
- some use port's phy-mode property from device-tree
- some leave it at default (HW initialized)
- some choose the mode according to some information the driver
computes
- some try to find a mode that gives the maximum possible speed
(mv88e6xxx, for example)
for example take a look at mt7530 driver
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/net/dsa/mt7530.c?h=v5.19-rc5
lines 2213-2250
function mt7530_setup()
reads phy-mode from device-tree if port 5 has a node,
otherwise tries to determine the mode from gmac node
line 2847
function mt7531_cpu_port_config()
decides PHY mode according to some prior settings
Russell wrote a RFC series
https://lore.kernel.org/netdev/YsQIjC7UpcGWJovx@shell.armlinux.org.uk/T/
in which
- mv88e6xxx is patched to report the max speed mode to phylink
- for other drivers, if no default interface is reported, an interface
will be inferred from the reported mac capabilities, such that it
gives maximum possible speed
It is very probable that this will break your drivers, and so I ask you
to look at the RFC series, maybe test it, and give your comments or
additional patches that make it work.
Thank you.
Marek
More information about the Linux-mediatek
mailing list