summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/renesas/rswitch.c
diff options
context:
space:
mode:
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>2023-02-01 16:14:53 +0300
committerDavid S. Miller <davem@davemloft.net>2023-02-03 12:19:40 +0300
commit5cb630925b49dd13bf3aa43f299b11615c8fe9cd (patch)
treea3f6522b2880ee8cacc12cbee0361ae8b10981cf /drivers/net/ethernet/renesas/rswitch.c
parent0df024d0f1d3e556e38e5418fc3577a2c7263764 (diff)
downloadlinux-5cb630925b49dd13bf3aa43f299b11615c8fe9cd.tar.xz
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>
Diffstat (limited to 'drivers/net/ethernet/renesas/rswitch.c')
-rw-r--r--drivers/net/ethernet/renesas/rswitch.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/renesas/rswitch.c b/drivers/net/ethernet/renesas/rswitch.c
index f8b3a81c0447..f1a0dd1098f9 100644
--- a/drivers/net/ethernet/renesas/rswitch.c
+++ b/drivers/net/ethernet/renesas/rswitch.c
@@ -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;
}
}