* [PATCH v3] net: usb: lan78xx: scan all MDIO addresses on LAN7801
@ 2026-02-18 5:28 Martin Pålsson
2026-02-19 22:50 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Martin Pålsson @ 2026-02-18 5:28 UTC (permalink / raw)
To: Thangaraj Samynathan, Rengarajan Sundararajan, UNGLinuxDriver,
Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Woojung Huh
Cc: netdev, linux-usb, linux-kernel, Martin Pålsson
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.
Remove the restrictive phy_mask assignment for the LAN7801 so that the
default mask of 0 applies, allowing all 32 MDIO addresses to be
scanned during bus registration.
Fixes: 02dc1f3d613d ("lan78xx: add LAN7801 MAC only support")
Signed-off-by: Martin Pålsson <martin@poleshift.se>
---
Changes in v3:
- Removed restrictive phy_mask assignment and comment, relying on the
default mask of 0 to scan all 32 MDIO addresses (Maxime Chevallier)
- Link to v2: https://lore.kernel.org/r/20260216-lan78xx-phy-mask-fix-v2-1-6e97e59edd47@poleshift.se
Changes in v2:
- Added Fixes: tag
- Link to v1: https://lore.kernel.org/r/20260214-lan78xx-phy-mask-fix-v1-1-3baa100861e4@poleshift.se
---
drivers/net/usb/lan78xx.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/net/usb/lan78xx.c b/drivers/net/usb/lan78xx.c
index 00397a807393..065588c9cfa6 100644
--- a/drivers/net/usb/lan78xx.c
+++ b/drivers/net/usb/lan78xx.c
@@ -2094,8 +2094,6 @@ static int lan78xx_mdio_init(struct lan78xx_net *dev)
dev->mdiobus->phy_mask = ~(1 << 1);
break;
case ID_REV_CHIP_ID_7801_:
- /* scan thru PHYAD[2..0] */
- dev->mdiobus->phy_mask = ~(0xFF);
break;
}
---
base-commit: ee5492fd88cfc079c19fbeac78e9e53b7f6c04f3
change-id: 20260214-lan78xx-phy-mask-fix-a4260de15a4c
Best regards,
--
Martin Pålsson <martin@poleshift.se>
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v3] net: usb: lan78xx: scan all MDIO addresses on LAN7801
2026-02-18 5:28 [PATCH v3] net: usb: lan78xx: scan all MDIO addresses on LAN7801 Martin Pålsson
@ 2026-02-19 22:50 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-02-19 22:50 UTC (permalink / raw)
To: =?utf-8?q?Martin_P=C3=A5lsson_=3Cmartin=40poleshift=2Ese=3E?=
Cc: Thangaraj.S, Rengarajan.S, UNGLinuxDriver, andrew+netdev, davem,
edumazet, kuba, pabeni, woojung.huh, netdev, linux-usb,
linux-kernel
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Wed, 18 Feb 2026 05:28:22 +0000 you 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.
>
> [...]
Here is the summary with links:
- [v3] net: usb: lan78xx: scan all MDIO addresses on LAN7801
https://git.kernel.org/netdev/net/c/f1e2f0ce704e
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-02-19 22:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-18 5:28 [PATCH v3] net: usb: lan78xx: scan all MDIO addresses on LAN7801 Martin Pålsson
2026-02-19 22:50 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox