[PATCH net-next v3 3/4] microchip: lan865x: enable PHY interrupt via virtual IRQ

From: Parthiban Veerasooran

Date: Fri Sep 18 2026 - 10:49:52 EST


The LAN865X integrates the PHY directly into the MAC-PHY SPI device.
The PHY has no dedicated interrupt line; its interrupt is always
delivered as the PHYINT bit in STATUS0.

Pass the OA_TC6_PHY_INT quirk flag to oa_tc6_init() to enable the
virtual IRQ infrastructure. This lets phylib operate in interrupt mode
and drives the PHY driver's config_intr/handle_interrupt callbacks for
the LAN865X internal PHY.

This completes the collision-detection fix started in "net: phy:
microchip_t1s: fix collision detection on PLCA status change"; without
this patch (and its prerequisite, "net: ethernet: oa_tc6: deliver the
PHY interrupt to phylib"), LAN865X stays on that commit's static CDEN
fallback instead of tracking PLCA transitions dynamically.

lan865x_revb_fixup_registers[] does not program COL_DET_CTRL0
(0x0087), so CDEN correctness relies on that bit's hardware reset
default together with lan86xx_handle_interrupt() tracking every
subsequent PLCA transition via the PSTC interrupt this patch enables.

Fixes: 78341049fbcd ("net: phy: microchip_t1s: configure collision detection based on PLCA mode")
Signed-off-by: Parthiban Veerasooran <parthiban.veerasooran@xxxxxxxxxxxxx>
---
drivers/net/ethernet/microchip/lan865x/lan865x.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/microchip/lan865x/lan865x.c b/drivers/net/ethernet/microchip/lan865x/lan865x.c
index 26a2761332a5..043a3dc3f965 100644
--- a/drivers/net/ethernet/microchip/lan865x/lan865x.c
+++ b/drivers/net/ethernet/microchip/lan865x/lan865x.c
@@ -332,6 +332,7 @@ static const struct net_device_ops lan865x_netdev_ops = {

static int lan865x_probe(struct spi_device *spi)
{
+ struct oa_tc6_quirks tc6_quirks = {};
struct net_device *netdev;
struct lan865x_priv *priv;
int ret;
@@ -346,7 +347,8 @@ static int lan865x_probe(struct spi_device *spi)
spi_set_drvdata(spi, priv);
INIT_WORK(&priv->multicast_work, lan865x_multicast_work_handler);

- priv->tc6 = oa_tc6_init(spi, netdev, NULL);
+ tc6_quirks.quirk_flags = OA_TC6_PHY_INT;
+ priv->tc6 = oa_tc6_init(spi, netdev, &tc6_quirks);
if (!priv->tc6) {
ret = -ENODEV;
goto free_netdev;
--
2.43.0