Re: [PATCH] net: usb: lan78xx: scan all MDIO addresses on LAN7801
From: Andrew Lunn <andrew@lunn.ch>
Date: 2026-02-16 02:54:57
Also in:
linux-usb, lkml
From: Andrew Lunn <andrew@lunn.ch>
Date: 2026-02-16 02:54:57
Also in:
linux-usb, lkml
On Sat, Feb 14, 2026 at 12:15:21PM +0000, Martin Pålsson wrote:
The LAN7801 is designed exclusively for external PHYs (unlike the LAN7800/LAN7850 which have internal PHYs), but lan78xx_mdio_init() restricts PHY scanning to MDIO addresses 0-7 by setting phy_mask to ~(0xFF). This prevents discovery of external PHYs wired to addresses outside that range. One such case is the DP83TC814 100BASE-T1 PHY, which is typically configured at MDIO address 10 via PHYAD bootstrap pins and goes undetected with the current mask. Set phy_mask to 0 for the LAN7801 so that all 32 MDIO addresses are scanned during bus registration, allowing any external PHY to be discovered regardless of its address. Signed-off-by: Martin Pålsson <redacted>
Since you are submitting this for net, it should have a Fixes: tag. Also, since this is a 100Base PHY, i assume dev->interface needs to be PHY_INTERFACE_MODE_MII? But it looks like lan78xx_get_phy() is hard coding it to PHY_INTERFACE_MODE_RGMII_ID for the 7801. How is this working out for you? Andrew