[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <w4qjjjt3wy5jwjxsfmg3mjqje5liocsbbnao34zbniijghx45a@3fxkroph6miz>
Date: Wed, 20 Dec 2023 13:19:22 +0000
From: Alvin Šipraga <ALSI@...g-olufsen.dk>
To: Luiz Angelo Daros de Luca <luizluca@...il.com>
CC: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linus.walleij@...aro.org" <linus.walleij@...aro.org>, "andrew@...n.ch"
<andrew@...n.ch>, "f.fainelli@...il.com" <f.fainelli@...il.com>,
"olteanv@...il.com" <olteanv@...il.com>, "davem@...emloft.net"
<davem@...emloft.net>, "edumazet@...gle.com" <edumazet@...gle.com>,
"kuba@...nel.org" <kuba@...nel.org>, "pabeni@...hat.com" <pabeni@...hat.com>,
"arinc.unal@...nc9.com" <arinc.unal@...nc9.com>
Subject: Re: [PATCH net-next v2 7/7] Revert "net: dsa: OF-ware slave_mii_bus"
On Wed, Dec 20, 2023 at 01:24:30AM -0300, Luiz Angelo Daros de Luca wrote:
> This reverts commit fe7324b932222574a0721b80e72c6c5fe57960d1.
>
> The use of user_mii_bus is inappropriate when the hardware is described
> with a device-tree [1].
>
> Since all drivers currently implementing ds_switch_ops.phy_{read,write}
> were not updated to utilize the MDIO information from OF with the
> generic "dsa user mii", they might not be affected by this change.
/might/ not? I think this paragraph could be more precisely worded.
>
> [1] https://lkml.kernel.org/netdev/20231213120656.x46fyad6ls7sqyzv@skbuf/T/#u
>
> Signed-off-by: Luiz Angelo Daros de Luca <luizluca@...il.com>
> ---
> net/dsa/dsa.c | 7 +------
> 1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c
> index ac7be864e80d..cea364c81b70 100644
> --- a/net/dsa/dsa.c
> +++ b/net/dsa/dsa.c
> @@ -15,7 +15,6 @@
> #include <linux/slab.h>
> #include <linux/rtnetlink.h>
> #include <linux/of.h>
> -#include <linux/of_mdio.h>
> #include <linux/of_net.h>
> #include <net/dsa_stubs.h>
> #include <net/sch_generic.h>
> @@ -626,7 +625,6 @@ static void dsa_switch_teardown_tag_protocol(struct dsa_switch *ds)
>
> static int dsa_switch_setup(struct dsa_switch *ds)
> {
> - struct device_node *dn;
> int err;
>
> if (ds->setup)
> @@ -666,10 +664,7 @@ static int dsa_switch_setup(struct dsa_switch *ds)
>
> dsa_user_mii_bus_init(ds);
>
> - dn = of_get_child_by_name(ds->dev->of_node, "mdio");
> -
> - err = of_mdiobus_register(ds->user_mii_bus, dn);
> - of_node_put(dn);
> + err = mdiobus_register(ds->user_mii_bus, dn);
> if (err < 0)
> goto free_user_mii_bus;
> }
> --
> 2.43.0
>
Powered by blists - more mailing lists