]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commitdiff
net: usb: lan78xx: scan all MDIO addresses on LAN7801
authorMartin Pålsson <martin@poleshift.se>
Wed, 18 Feb 2026 05:28:22 +0000 (05:28 +0000)
committerJakub Kicinski <kuba@kernel.org>
Thu, 19 Feb 2026 22:30:50 +0000 (14:30 -0800)
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>
Link: https://patch.msgid.link/0110019c6f388aff-98d99cf0-4425-4fff-b16b-dea5ad8fafe0-000000@eu-north-1.amazonses.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/usb/lan78xx.c

index 00397a807393426d9d3c61aaf2231609f9bb461f..065588c9cfa65df877a8cf8761e572aaaa0f3a5e 100644 (file)
@@ -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;
        }