Skip to content

Commit 096516d

Browse files
Ryceancurrykuba-moo
authored andcommitted
net: phy: broadcom: stub c45 read/write for 54810
The 54810 does not support c45. The mmd_phy_indirect accesses return arbirtary values leading to odd behavior like saying it supports EEE when it doesn't. We also see that reading/writing these non-existent MMD registers leads to phy instability in some cases. Fixes: b14995a ("net: phy: broadcom: Add BCM54810 PHY entry") Signed-off-by: Justin Chen <justin.chen@broadcom.com> Reviewed-by: Florian Fainelli <florian.fainelli@broadcom.com> Link: https://lore.kernel.org/r/1691901708-28650-1-git-send-email-justin.chen@broadcom.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent e4dd0d3 commit 096516d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

drivers/net/phy/broadcom.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -542,6 +542,17 @@ static int bcm54xx_resume(struct phy_device *phydev)
542542
return bcm54xx_config_init(phydev);
543543
}
544544

545+
static int bcm54810_read_mmd(struct phy_device *phydev, int devnum, u16 regnum)
546+
{
547+
return -EOPNOTSUPP;
548+
}
549+
550+
static int bcm54810_write_mmd(struct phy_device *phydev, int devnum, u16 regnum,
551+
u16 val)
552+
{
553+
return -EOPNOTSUPP;
554+
}
555+
545556
static int bcm54811_config_init(struct phy_device *phydev)
546557
{
547558
int err, reg;
@@ -1103,6 +1114,8 @@ static struct phy_driver broadcom_drivers[] = {
11031114
.get_strings = bcm_phy_get_strings,
11041115
.get_stats = bcm54xx_get_stats,
11051116
.probe = bcm54xx_phy_probe,
1117+
.read_mmd = bcm54810_read_mmd,
1118+
.write_mmd = bcm54810_write_mmd,
11061119
.config_init = bcm54xx_config_init,
11071120
.config_aneg = bcm5481_config_aneg,
11081121
.config_intr = bcm_phy_config_intr,

0 commit comments

Comments
 (0)