Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion drivers/net/phy/marvell10g.c
Original file line number Diff line number Diff line change
Expand Up @@ -414,15 +414,18 @@ static int mv3310_power_up(struct phy_device *phydev)
* SWRST. Without this, the second and subsequent link-up sequences
* result in broken TX/RX. The datasheet specifies bit 15 = 1 means
* reset in progress, 0 means normal operation.
* To be safe, also add a static delay after polling, with median upper
* bound of SWRST completion time observed at <10ms.
*/
if (phy_read_mmd_poll_timeout(phydev, MDIO_MMD_VEND2, MV_V2_PORT_CTRL,
ret, !(ret & MV_V2_33X0_PORT_CTRL_SWRST),
5000, 200000, true))
phydev_warn(phydev, "SWRST timed out 200ms\n");
msleep(10);

ret = phy_set_bits_mmd(phydev, MDIO_MMD_VEND2, MV_V2_PORT_CTRL,
MV_V2_33X0_PORT_CTRL_SWRST);
msleep(100);
msleep(200);
return ret;
}

Expand Down
Loading