Thread (12 messages) 12 messages, 3 authors, 2026-09-22

Re: [PATCH net v8 1/4] net: usb: lan78xx: register the PHY interrupt with the MDIO bus

flat view

From: Aleksei Sviridkin <hidden>
Date: 2026-09-18 08:20:34
Also in: linux-usb, lkml

quoted
+	phydev->irq = dev->mdiobus->irq[phydev->mdio.addr];
This line is redundant, given how phylib works.
It is once the table is filled before the bus is registered, and here
it is not yet: this patch writes the table in lan78xx_phy_init(), after
the scan, so phy_device_create() had already seeded phydev->irq from a
table that still read PHY_POLL.

The number is known before the bus exists, lan78xx_setup_irq_domain()
runs ahead of lan78xx_mdio_init(), so v9 fills the table there, before
of_mdiobus_register(), and drops this assignment together with the
if/else above it. On a 7801 the PHY address is not known until the scan,
so every entry gets the number, the way mdio-moxart does it. A
devicetree mdio node still wins: fwnode_mdio writes both fields after
the device is created.
quoted
 	netdev_dbg(dev->net, "phydev->irq = %d\n", phydev->irq);
So maybe change this line?
It goes too. phy_attached_print() reports the irq at connect.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help