lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <781ec983-68f1-4012-8970-bd875d6e5ca1@broadcom.com>
Date: Thu, 4 Jan 2024 09:36:27 -0800
From: Florian Fainelli <florian.fainelli@...adcom.com>
To: Vladimir Oltean <vladimir.oltean@....com>, netdev@...r.kernel.org
Cc: "David S. Miller" <davem@...emloft.net>,
 Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
 Paolo Abeni <pabeni@...hat.com>, Andrew Lunn <andrew@...n.ch>,
 Florian Fainelli <f.fainelli@...il.com>,
 Luiz Angelo Daros de Luca <luizluca@...il.com>,
 Alvin Šipraga <alsi@...g-olufsen.dk>,
 Linus Walleij <linus.walleij@...aro.org>, Hauke Mehrtens <hauke@...ke-m.de>,
 Christian Marangi <ansuelsmth@...il.com>, Arınç ÜNAL
 <arinc.unal@...nc9.com>
Subject: Re: [PATCH net-next 02/10] net: dsa: lantiq_gswip: use devres for
 internal MDIO bus, not ds->user_mii_bus

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@....com>

Reviewed-by: Florian Fainelli <florian.fainelli@...adcom.com>
-- 
Florian


Download attachment "smime.p7s" of type "application/pkcs7-signature" (4221 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ