[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250317063452.3072784-1-JJLIU0@nuvoton.com>
Date: Mon, 17 Mar 2025 14:34:52 +0800
From: Jim Liu <jim.t90615@...il.com>
To: JJLIU0@...oton.com,
jim.t90615@...il.com,
florian.fainelli@...adcom.com,
andrew@...n.ch,
hkallweit1@...il.com,
kuba@...nel.org,
linux@...linux.org.uk,
edumazet@...gle.com,
pabeni@...hat.com
Cc: netdev@...r.kernel.org,
giulio.benetti+tekvox@...ettiengineering.com,
bcm-kernel-feedback-list@...adcom.com,
linux-kernel@...r.kernel.org
Subject: [v2,net] net: phy: broadcom: Correct BCM5221 PHY model detection failure
Use "BRCM_PHY_MODEL" can be applied to the entire 5221 family of PHYs.
Fixes: 3abbd0699b67 ("net: phy: broadcom: add support for BCM5221 phy")
Signed-off-by: Jim Liu <jim.t90615@...il.com>
---
v2:
- add target tree
- add maintainer in mail thread
- modify checkpatch warning
---
drivers/net/phy/broadcom.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/phy/broadcom.c b/drivers/net/phy/broadcom.c
index 22edb7e4c1a1..3529289e9d13 100644
--- a/drivers/net/phy/broadcom.c
+++ b/drivers/net/phy/broadcom.c
@@ -859,7 +859,7 @@ static int brcm_fet_config_init(struct phy_device *phydev)
return reg;
/* Unmask events we are interested in and mask interrupts globally. */
- if (phydev->phy_id == PHY_ID_BCM5221)
+ if (BRCM_PHY_MODEL(phydev) == PHY_ID_BCM5221)
reg = MII_BRCM_FET_IR_ENABLE |
MII_BRCM_FET_IR_MASK;
else
@@ -888,7 +888,7 @@ static int brcm_fet_config_init(struct phy_device *phydev)
return err;
}
- if (phydev->phy_id != PHY_ID_BCM5221) {
+ if (BRCM_PHY_MODEL(phydev) != PHY_ID_BCM5221) {
/* Set the LED mode */
reg = __phy_read(phydev, MII_BRCM_FET_SHDW_AUXMODE4);
if (reg < 0) {
@@ -1009,7 +1009,7 @@ static int brcm_fet_suspend(struct phy_device *phydev)
return err;
}
- if (phydev->phy_id == PHY_ID_BCM5221)
+ if (BRCM_PHY_MODEL(phydev) == PHY_ID_BCM5221)
/* Force Low Power Mode with clock enabled */
reg = BCM5221_SHDW_AM4_EN_CLK_LPM | BCM5221_SHDW_AM4_FORCE_LPM;
else
--
2.34.1
Powered by blists - more mailing lists