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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
 <PAXPR04MB851096811F2CEC62BEDA67898890A@PAXPR04MB8510.eurprd04.prod.outlook.com>
Date: Tue, 27 Jan 2026 03:01:43 +0000
From: Wei Fang <wei.fang@....com>
To: Andrew Lunn <andrew@...n.ch>
CC: "hkallweit1@...il.com" <hkallweit1@...il.com>, "linux@...linux.org.uk"
	<linux@...linux.org.uk>, "davem@...emloft.net" <davem@...emloft.net>,
	"edumazet@...gle.com" <edumazet@...gle.com>, "kuba@...nel.org"
	<kuba@...nel.org>, "pabeni@...hat.com" <pabeni@...hat.com>,
	"florian.fainelli@...adcom.com" <florian.fainelli@...adcom.com>, xiaolei.wang
	<xiaolei.wang@...driver.com>, "maxime.chevallier@...tlin.com"
	<maxime.chevallier@...tlin.com>, "quic_abchauha@...cinc.com"
	<quic_abchauha@...cinc.com>, "quic_sarohasa@...cinc.com"
	<quic_sarohasa@...cinc.com>, "imx@...ts.linux.dev" <imx@...ts.linux.dev>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH net] net: phy: add device link between MAC device and MDIO
 device

> > The commit bc66fa87d4fd ("net: phy: Add link between phy dev and mac
> > dev") has created a device link between the MAC and the PHY if the MAC
> > uses a shared MDIO bus (The MDIO and the MAC are two separate devices).
> 
> > Sarosh Hasan tried to change the DL_FLAG_STATELESS flag to
> > DL_FLAG_AUTOREMOVE_SUPPLIER to fix the issue [1]. However, the solution
> > does not take into account the hot-swappable PHY devices (such as SFP).
> > so when the PHY device is unplugged, the MAC driver will automatically
> > be removed, which is not the expected behavior.
> >
> > Therefore, to solve this issue of the shared MDIO bus, we create the
> > device link between the MAC device and the MDIO device, rather than
> > between the MAC device and the PHY device. And when the shared MDIO bus
> > is removed, all MAC drivers that depend on it will also be removed.
> 
> Shouldn't there be a full chain here? MAC->MDIO->PHY?

The PHY is already a child of the MDIO bus device, so the MDIO->PHY
relationship is already represented.

> 
> For the case of the SFP, maybe it should be
> 
> MAC->SFP Cage and I2C MDIO->PHY
> 
> So if the PHY inside an SFP disappears, the I2C MDIO bus is
> removed. But there is no link upwards from that, so the SFP cage and
> the MAC are left alone?
> 

Sorry, I have no experience with SPF module, but from Russell's reply,
it seems unlikely that the MDIO bus would be removed when removing
the PHY. I also modified Sarosh's patch based on this premise (the MDIO
bus will not be removed due to the removal of the PHY).


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ