From: Florian Fainelli <florian.fainelli@broadcom.com>
To: Vladimir Oltean <vladimir.oltean@nxp.com>, netdev@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
"Paolo Abeni" <pabeni@redhat.com>, "Andrew Lunn" <andrew@lunn.ch>,
"Florian Fainelli" <f.fainelli@gmail.com>,
"Luiz Angelo Daros de Luca" <luizluca@gmail.com>,
"Alvin Šipraga" <alsi@bang-olufsen.dk>,
"Linus Walleij" <linus.walleij@linaro.org>,
"Hauke Mehrtens" <hauke@hauke-m.de>,
"Christian Marangi" <ansuelsmth@gmail.com>,
"Arınç ÜNAL" <arinc.unal@arinc9.com>
Subject: Re: [PATCH net-next 02/10] net: dsa: lantiq_gswip: use devres for internal MDIO bus, not ds->user_mii_bus
Date: Thu, 4 Jan 2024 09:36:27 -0800 [thread overview]
Message-ID: <781ec983-68f1-4012-8970-bd875d6e5ca1@broadcom.com> (raw)
In-Reply-To: <20240104140037.374166-3-vladimir.oltean@nxp.com>
[-- Attachment #1: Type: text/plain, Size: 1385 bytes --]
On 1/4/24 06:00, Vladimir Oltean wrote:
> This driver does not need any of the functionalities that make
> ds->user_mii_bus special. Those use cases are listed here:
> https://lore.kernel.org/netdev/20231221174746.hylsmr3f7g5byrsi@skbuf/
>
> It just makes use of ds->user_mii_bus only as storage for its own MDIO
> bus, which otherwise has no connection to the framework. This is because:
>
> - the gswip driver only probes on OF: it fails if of_device_get_match_data()
> returns NULL
>
> - when the child OF node of the MDIO bus is absent, no MDIO bus is
> registered at all, not even by the DSA framework. In order for that to
> have happened, the gswip driver would have needed to provide
> ->phy_read() and ->phy_write() in struct dsa_switch_ops, which it does
> not.
>
> We can break the connection between the gswip driver and the DSA
> framework and still preserve the same functionality.
>
> Since commit 3b73a7b8ec38 ("net: mdio_bus: add refcounting for fwnodes
> to mdiobus"), MDIO buses take ownership of the OF node handled to them,
> and release it on their own. The gswip driver no longer needs to do
> this.
>
> Combine that with devres, and we no longer need to keep track of
> anything for teardown purposes.
>
> Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com>
--
Florian
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4221 bytes --]
next prev parent reply other threads:[~2024-01-04 17:36 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-04 14:00 [PATCH net-next 00/10] ds->user_mii_bus cleanup (part 1) Vladimir Oltean
2024-01-04 14:00 ` [PATCH net-next 01/10] net: dsa: lantiq_gswip: delete irrelevant use of ds->phys_mii_mask Vladimir Oltean
2024-01-04 15:52 ` Alvin Šipraga
2024-01-04 17:07 ` Florian Fainelli
2024-01-04 14:00 ` [PATCH net-next 02/10] net: dsa: lantiq_gswip: use devres for internal MDIO bus, not ds->user_mii_bus Vladimir Oltean
2024-01-04 15:53 ` Alvin Šipraga
2024-01-04 17:36 ` Florian Fainelli [this message]
2024-01-05 2:43 ` Luiz Angelo Daros de Luca
2024-01-04 14:00 ` [PATCH net-next 03/10] net: dsa: lantiq_gswip: ignore MDIO buses disabled in OF Vladimir Oltean
2024-01-04 15:53 ` Alvin Šipraga
2024-01-04 17:36 ` Florian Fainelli
2024-01-04 14:00 ` [PATCH net-next 04/10] net: dsa: qca8k: put MDIO bus OF node on qca8k_mdio_register() failure Vladimir Oltean
2024-01-04 15:46 ` Alvin Šipraga
2024-01-04 17:20 ` Vladimir Oltean
2024-01-04 17:37 ` Florian Fainelli
2024-01-05 0:25 ` Luiz Angelo Daros de Luca
2024-01-04 14:00 ` [PATCH net-next 05/10] net: dsa: qca8k: skip MDIO bus creation if its OF node has status = "disabled" Vladimir Oltean
2024-01-04 15:44 ` Alvin Šipraga
2024-01-04 15:49 ` Vladimir Oltean
2024-01-04 16:04 ` Alvin Šipraga
2024-01-04 16:05 ` Alvin Šipraga
2024-01-04 17:38 ` Florian Fainelli
2024-01-05 2:19 ` Luiz Angelo Daros de Luca
2024-01-10 16:35 ` Vladimir Oltean
2024-01-04 14:00 ` [PATCH net-next 06/10] net: dsa: qca8k: assign ds->user_mii_bus only for the non-OF case Vladimir Oltean
2024-01-04 15:48 ` Alvin Šipraga
2024-01-04 17:35 ` Florian Fainelli
2024-01-05 2:35 ` Luiz Angelo Daros de Luca
2024-01-04 14:00 ` [PATCH net-next 07/10] net: dsa: qca8k: consolidate calls to a single devm_of_mdiobus_register() Vladimir Oltean
2024-01-04 15:49 ` Alvin Šipraga
2024-01-04 17:34 ` Florian Fainelli
2024-01-04 23:07 ` Christian Marangi
2024-01-05 2:26 ` Luiz Angelo Daros de Luca
2024-01-04 14:00 ` [PATCH net-next 08/10] net: dsa: qca8k: use "dev" consistently within qca8k_mdio_register() Vladimir Oltean
2024-01-04 15:50 ` Alvin Šipraga
2024-01-04 17:34 ` Florian Fainelli
2024-01-04 22:55 ` Christian Marangi
2024-01-05 2:21 ` Luiz Angelo Daros de Luca
2024-01-04 14:00 ` [PATCH net-next 09/10] net: dsa: bcm_sf2: stop assigning an OF node to the ds->user_mii_bus Vladimir Oltean
2024-01-04 15:59 ` Alvin Šipraga
2024-01-04 17:32 ` Florian Fainelli
2024-01-04 14:00 ` [PATCH net-next 10/10] net: dsa: bcm_sf2: drop priv->master_mii_dn Vladimir Oltean
2024-01-04 15:59 ` Alvin Šipraga
2024-01-04 17:32 ` Florian Fainelli
2024-01-05 2:48 ` Luiz Angelo Daros de Luca
2024-01-05 12:00 ` [PATCH net-next 00/10] ds->user_mii_bus cleanup (part 1) patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=781ec983-68f1-4012-8970-bd875d6e5ca1@broadcom.com \
--to=florian.fainelli@broadcom.com \
--cc=alsi@bang-olufsen.dk \
--cc=andrew@lunn.ch \
--cc=ansuelsmth@gmail.com \
--cc=arinc.unal@arinc9.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=hauke@hauke-m.de \
--cc=kuba@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=luizluca@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=vladimir.oltean@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).