]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/sky2.c
sky2: Fix suspend/hibernation/shutdown regression with WOL enabled (rev. 2)
[linux-2.6-omap-h63xx.git] / drivers / net / sky2.c
index 06dfc950f33eb00f64f6d196d5d092ea58b5e508..e24b25ca1c690e0d78df1feb29e2277f9347a3af 100644 (file)
@@ -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) */