Re: [RFC PATCH net-next v3 17/20] net: phy: phylink: permit to pass dev_flags to phylink_connect_phy

From: Florian Fainelli
Date: Tue May 04 2021 - 18:33:49 EST


On 5/4/21 3:29 PM, Ansuel Smith wrote:
> Add support for phylink_connect_phy to pass dev_flags to the PHY driver.
> Change any user of phylink_connect_phy to pass 0 as dev_flags by
> default.
>
> Signed-off-by: Ansuel Smith <ansuelsmth@xxxxxxxxx>

I do not think that this patch and the next one are necessary at all,
because phylink_of_phy_connect() already supports passing a dev_flags.

That means that you should be representing the switch's internal MDIO
bus in the Device Tree and then describe how each port of the switch
connects to the internal PHY on that same bus. Once you do that the
logic in net/dsa/slave.c will call phylink_of_phy_connect() and all you
will have to do is implement dsa_switch_ops::get_phy_flags. Can you try
that?
--
Florian