OSDN Git Service

net: mvneta: speed down the PHY, if WoL used, to save energy
authorDaniel González Cabanelas <dgcbueu@gmail.com>
Fri, 26 Jun 2020 15:18:19 +0000 (17:18 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 26 Jun 2020 20:36:33 +0000 (13:36 -0700)
commit61b5cc20c877f9703fa46b24c273cbb5affb26e9
treed2c2384489c0982ad6ef47e6add1db84da13f91f
parentb0f46a9754e2b4bb2bcbd9c521eb5bf156401f54
net: mvneta: speed down the PHY, if WoL used, to save energy

Some PHYs connected to this ethernet hardware support the WoL feature.
But when WoL is enabled and the machine is powered off, the PHY remains
waiting for a magic packet at max speed (i.e. 1Gbps), which is a waste of
energy.

Slow down the PHY speed before stopping the ethernet if WoL is enabled,
and save some energy while the machine is powered off or sleeping.

Tested using an Armada 370 based board (LS421DE) equipped with a Marvell
88E1518 PHY.

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/mvneta.c