Re: [PATCH net-next v2 4/8] net: mdio: realtek-rtl9300: Configure hardware polling during probing
From: Andrew Lunn <andrew@lunn.ch>
Date: 2026-06-29 16:38:15
Also in:
linux-devicetree
From: Andrew Lunn <andrew@lunn.ch>
Date: 2026-06-29 16:38:15
Also in:
linux-devicetree
+static int otto_emdio_notify_phy_attach(struct phy_device *phydev)
+{
+ struct otto_emdio_priv *priv = otto_emdio_bus_to_priv(phydev->mdio.bus);
+ int port = otto_emdio_phy_to_port(phydev->mdio.bus, phydev->mdio.addr);
+ int ret;
+
+ if (port < 0)
+ return port;Here seems like a good place to check the PHY is a realtek PHY, and return -ENODEV if not. That should cause phy_attach_direct() to fail, making it impossible to configure the port up. Andrew