Re: [PATCH net-next v1 2/6] r8169: add support for phylink
From: Andrew Lunn
Date: Mon Jun 08 2026 - 14:58:26 EST
> > Hi Maxime,
> >
> > I have one question about the existing link-change interrupt model.
> >
> > For most r8169 chips, the PHY exists and the current driver uses the MAC LinkChg interrupt to notify phylib:
> > if (status & LinkChg)
> > phy_mac_interrupt(tp->phydev);
>
> This is the first time there's an attempt to port a driver that
> typically deals with an embedded PHY to phylink, so we need to
> sort this out.
Well, mv88e6xxx has something similar, for its embedded PHYs. For
that, we export the interrupt controller as a linux interrupt
controller. We then allow two different things:
1) The PHY has a phandle to the interrupt. That causes phylib to
request the interrupt.
2) The interrupt controller code fills mdiobus->irq[addr] with the
interrupt number, so that phylib will request the interrupt.
Andrew