Skip to content

Commit c7b75be

Browse files
Jiawen Wudavem330
authored andcommitted
net: phy: marvell10g: fix 88x3310 power up
Clear MV_V2_PORT_CTRL_PWRDOWN bit to set power up for 88x3310 PHY, it sometimes does not take effect immediately. And a read of this register causes the bit not to clear. This will cause mv3310_reset() to time out, which will fail the config initialization. So add a delay before the next access. Fixes: c9cc1c8 ("net: phy: marvell10g: place in powersave mode at probe") Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com> Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 32ad45b commit c7b75be

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/net/phy/marvell10g.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,13 @@ static int mv3310_power_up(struct phy_device *phydev)
328328
ret = phy_clear_bits_mmd(phydev, MDIO_MMD_VEND2, MV_V2_PORT_CTRL,
329329
MV_V2_PORT_CTRL_PWRDOWN);
330330

331+
/* Sometimes, the power down bit doesn't clear immediately, and
332+
* a read of this register causes the bit not to clear. Delay
333+
* 100us to allow the PHY to come out of power down mode before
334+
* the next access.
335+
*/
336+
udelay(100);
337+
331338
if (phydev->drv->phy_id != MARVELL_PHY_ID_88X3310 ||
332339
priv->firmware_ver < 0x00030000)
333340
return ret;

0 commit comments

Comments
 (0)