]> git.baikalelectronics.ru Git - kernel.git/commit
net: mvneta: speed down the PHY, if WoL used, to save energy
authorDaniel González Cabanelas <dgcbueu@gmail.com>
Tue, 12 May 2020 17:59:48 +0000 (19:59 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 13 May 2020 22:21:11 +0000 (15:21 -0700)
commitb5d55956f10a505b9398c511cf3aafd96fe712b2
tree2eda4e6560659f535688ee20012fc7e802ecc4cc
parentae1cc146464ed4f5d0e1b4ddfa075e7c2d62242c
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