]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
e1000e: WoL fails on device ID 0x1501
authorJoe Jin <joe.jin@oracle.com>
Thu, 17 May 2012 07:46:14 +0000 (15:46 +0800)
committerJoe Jin <joe.jin@oracle.com>
Thu, 17 May 2012 07:46:14 +0000 (15:46 +0800)
PCI device ID 0x1501 has a hardware bug when the link downshifts for
whatever reason which requires a workaround.  The workaround already exists
for other similar devices but is not called for 0x1501 (it should be called
for any ICH8-based device that uses a GbE PHY).  There is also one other
instance when the workaround should be called - after disabling gigabit
speed when going to Sx.

(backported from commit 462d599449c1047259ec56bfdcca4f55f7a93038)
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
drivers/net/e1000e/ich8lan.c

index 088950b31413ef111cf8e673da96648ad10ef0c2..b0490408b0a06904e4e79139640b343dfbf5f718 100644 (file)
@@ -813,7 +813,7 @@ static s32 e1000_get_variants_ich8lan(struct e1000_adapter *adapter)
        }
 
        if ((adapter->hw.mac.type == e1000_ich8lan) &&
-           (adapter->hw.phy.type == e1000_phy_igp_3))
+           (adapter->hw.phy.type != e1000_phy_ife))
                adapter->flags |= FLAG_LSC_GIG_SPEED_DROP;
 
        /* Enable workaround for 82579 w/ ME enabled */
@@ -3665,15 +3665,14 @@ void e1000e_igp3_phy_powerdown_workaround_ich8lan(struct e1000_hw *hw)
  *  LPLU, Gig disable, MDIC PHY reset):
  *    1) Set Kumeran Near-end loopback
  *    2) Clear Kumeran Near-end loopback
- *  Should only be called for ICH8[m] devices with IGP_3 Phy.
+ *  Should only be called for ICH8[m] devices with any 1G Phy.
  **/
 void e1000e_gig_downshift_workaround_ich8lan(struct e1000_hw *hw)
 {
        s32 ret_val;
        u16 reg_data;
 
-       if ((hw->mac.type != e1000_ich8lan) ||
-           (hw->phy.type != e1000_phy_igp_3))
+       if ((hw->mac.type != e1000_ich8lan) || (hw->phy.type == e1000_phy_ife))
                return;
 
        ret_val = e1000e_read_kmrn_reg(hw, E1000_KMRNCTRLSTA_DIAG_OFFSET,
@@ -3710,6 +3709,9 @@ void e1000_suspend_workarounds_ich8lan(struct e1000_hw *hw)
        phy_ctrl |= E1000_PHY_CTRL_GBE_DISABLE;
        ew32(PHY_CTRL, phy_ctrl);
 
+       if (hw->mac.type == e1000_ich8lan)
+               e1000e_gig_downshift_workaround_ich8lan(hw);
+
        if (hw->mac.type >= e1000_pchlan) {
                e1000_oem_bits_config_ich8lan(hw, false);
                e1000_phy_hw_reset_ich8lan(hw);