Skip to content

Commit

Permalink
net: renesas: rswitch: Add phy_power_{on,off}() calling
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Yoshihiro Shimoda authored and David S. Miller committed Feb 3, 2023
1 parent 0df024d commit 5cb6309
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/net/ethernet/renesas/rswitch.c
Original file line number Diff line number Diff line change
Expand Up @@ -1146,6 +1146,11 @@ static void rswitch_adjust_link(struct net_device *ndev)
/* Current hardware has a restriction not to change speed at runtime */
if (phydev->link != rdev->etha->link) {
phy_print_status(phydev);
if (phydev->link)
phy_power_on(rdev->serdes);
else
phy_power_off(rdev->serdes);

rdev->etha->link = phydev->link;
}
}
Expand Down

0 comments on commit 5cb6309

Please sign in to comment.