Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e484d5f5 authored by Rafael J. Wysocki's avatar Rafael J. Wysocki Committed by Jeff Garzik
Browse files

sky2: Fix suspend/hibernation/shutdown regression with WOL enabled (rev. 2)



On my test box with the Asus M3A32-MVP main board there is a
regression from 2.6.26 related to suspend, hibernation and
shutdown.  Namely, if Wake-on-LAN is enabled with
'ethtool -s eth0 wol g', the box hangs solid during all of these
operations, while executing either sky2_suspend(), or
sky2_shutdown().  This patch fixes it for me.

Signed-off-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent 2726fcf0
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -665,11 +665,16 @@ static void sky2_phy_power_down(struct sky2_hw *hw, unsigned port)

	if (hw->chip_id != CHIP_ID_YUKON_EC) {
		if (hw->chip_id == CHIP_ID_YUKON_EC_U) {
			ctrl = gm_phy_read(hw, port, PHY_MARV_PHY_CTRL);
			/* select page 2 to access MAC control register */
			gm_phy_write(hw, port, PHY_MARV_EXT_ADR, 2);

			ctrl = gm_phy_read(hw, port, PHY_MARV_PHY_CTRL);
			/* enable Power Down */
			ctrl |= PHY_M_PC_POW_D_ENA;
			gm_phy_write(hw, port, PHY_MARV_PHY_CTRL, ctrl);

			/* set page register back to 0 */
			gm_phy_write(hw, port, PHY_MARV_EXT_ADR, 0);
		}

		/* set IEEE compatible Power Down Mode (dev. #4.99) */