Skip to content

Commit 4f1eaab

Browse files
jimliu3davem330
authored andcommitted
net: phy: broadcom: Correct BCM5221 PHY model detection
Correct detect condition is applied to the entire 5221 family of PHYs. Fixes: 3abbd06 ("net: phy: broadcom: add support for BCM5221 phy") Signed-off-by: Jim Liu <[email protected]> Reviewed-by: Michal Swiatkowski <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 2ea3964 commit 4f1eaab

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/net/phy/broadcom.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -859,7 +859,7 @@ static int brcm_fet_config_init(struct phy_device *phydev)
859859
return reg;
860860

861861
/* Unmask events we are interested in and mask interrupts globally. */
862-
if (phydev->phy_id == PHY_ID_BCM5221)
862+
if (phydev->drv->phy_id == PHY_ID_BCM5221)
863863
reg = MII_BRCM_FET_IR_ENABLE |
864864
MII_BRCM_FET_IR_MASK;
865865
else
@@ -888,7 +888,7 @@ static int brcm_fet_config_init(struct phy_device *phydev)
888888
return err;
889889
}
890890

891-
if (phydev->phy_id != PHY_ID_BCM5221) {
891+
if (phydev->drv->phy_id != PHY_ID_BCM5221) {
892892
/* Set the LED mode */
893893
reg = __phy_read(phydev, MII_BRCM_FET_SHDW_AUXMODE4);
894894
if (reg < 0) {
@@ -1009,7 +1009,7 @@ static int brcm_fet_suspend(struct phy_device *phydev)
10091009
return err;
10101010
}
10111011

1012-
if (phydev->phy_id == PHY_ID_BCM5221)
1012+
if (phydev->drv->phy_id == PHY_ID_BCM5221)
10131013
/* Force Low Power Mode with clock enabled */
10141014
reg = BCM5221_SHDW_AM4_EN_CLK_LPM | BCM5221_SHDW_AM4_FORCE_LPM;
10151015
else

0 commit comments

Comments
 (0)