Skip to content

Commit 5cb6309

Browse files
shimodaydavem330
authored andcommitted
net: renesas: rswitch: Add phy_power_{on,off}() calling
Some Ethernet PHYs (like marvell10g) will decide the host interface mode by the media-side speed. So, the rswitch driver needs to initialize one of the Ethernet SERDES (r8a779f0-eth-serdes) ports after linked the Ethernet PHY up. The r8a779f0-eth-serdes driver has .init() for initializing all ports and .power_on() for initializing each port. So, add phy_power_{on,off} calling for it. Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 0df024d commit 5cb6309

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/net/ethernet/renesas/rswitch.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1146,6 +1146,11 @@ static void rswitch_adjust_link(struct net_device *ndev)
11461146
/* Current hardware has a restriction not to change speed at runtime */
11471147
if (phydev->link != rdev->etha->link) {
11481148
phy_print_status(phydev);
1149+
if (phydev->link)
1150+
phy_power_on(rdev->serdes);
1151+
else
1152+
phy_power_off(rdev->serdes);
1153+
11491154
rdev->etha->link = phydev->link;
11501155
}
11511156
}

0 commit comments

Comments
 (0)