[PATCH net-next 0/6] net: dsa: always use phylink

Vladimir Oltean olteanv at gmail.com
Wed Jul 27 06:38:24 PDT 2022


Hello Marek,

On Wed, Jul 27, 2022 at 11:00:51AM +0200, Marek Behún wrote:
> Dear Vladimir,
> 
> am I understanding correctly that your main objection to this series is
> that it may break other drivers?

Yes, but I'm not saying this in a way that tries to make it impossible
to make progress. But rather, I've identified 8 drivers which may lack
complete device tree descriptions:
https://patchwork.kernel.org/project/netdevbpf/patch/20220723164635.1621911-1-vladimir.oltean@nxp.com/

Simply put, I have no indication that the changes presented here are a
step in the right direction for the remaining 7 drivers. Each and every
single one of them needs to be studied and discussed separately; the
discussion has already started for some.

> Do you think it would be okay if I changed it so that only mv88e6xxx
> driver would ask for phylink for CPU/DSA ports?

It would be a good start, yes. What I could do is I could move my
validation logic from the patch linked above into dsa_port_link_register_of().
Running that logic would let DSA know which properties are missing.
Then, for drivers that don't enforce validation, we could add new
dsa_switch_ops that separately ask the driver what phy-mode to use
(if missing) and what speed/duplex to use (if missing). Drivers can use
whatever heuristic is appropriate for their deployments to respond to this.
If the phy-mode and speed/duplex are finally resolved, DSA can create a
software_node and register with phylink that way. Otherwise, DSA will
continue to do what it does today, i.e. skip phylink registration.

How does that sound?



More information about the Linux-mediatek mailing list