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: <eaf25bd7-4211-45ca-a747-5039d69bd57c@lunn.ch>
Date: Wed, 7 Jan 2026 14:04:04 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Jijie Shao <shaojijie@...wei.com>
Cc: davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
	pabeni@...hat.com, andrew+netdev@...n.ch, horms@...nel.org,
	Frank.Sae@...or-comm.com, hkallweit1@...il.com,
	linux@...linux.org.uk, shenjian15@...wei.com,
	liuyonglong@...wei.com, chenhao418@...wei.com,
	jonathan.cameron@...wei.com, salil.mehta@...wei.com,
	shiyongbang@...wei.com, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH RFC net-next 3/6] net: hibmcge: create a software node
 for phy_led

On Wed, Jan 07, 2026 at 06:09:28PM +0800, Jijie Shao wrote:
> 
> on 2025/12/16 15:17, Andrew Lunn wrote:
> > On Mon, Dec 15, 2025 at 08:57:02PM +0800, Jijie Shao wrote:
> > 
> > > +int hbg_mdio_init(struct hbg_priv *priv)
> > > +{
> > > +	struct device *dev = &priv->pdev->dev;
> > > +	struct hbg_mac *mac = &priv->mac;
> > >   	struct mii_bus *mdio_bus;
> > >   	int ret;
> > > @@ -281,7 +389,7 @@ int hbg_mdio_init(struct hbg_priv *priv)
> > >   	mdio_bus->parent = dev;
> > >   	mdio_bus->priv = priv;
> > > -	mdio_bus->phy_mask = ~(1 << mac->phy_addr);
> > > +	mdio_bus->phy_mask = 0xFFFFFFFF; /* not scan phy device */
> > >   	mdio_bus->name = "hibmcge mii bus";
> > >   	mac->mdio_bus = mdio_bus;
> > I think you are taking the wrong approach.
> > 
> > Please consider trying to use of_mdiobus_register(). Either load a DT
> > overlay, or see if you can construct a tree of properties as you have
> > been doing, and pass it to of_mdiobus_register(). You then don't need
> > to destroy and create PHY devices.
> 
> This is not easy.
> `of_mdiobus_register()` requires a device_node, but I currently don't have one.
> It is precisely because there is no DT or ACPI node that I am using a software node as a substitute.

Which is why i suggested DT overlay.

drivers/misc/lan966x_pci.dtso

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ