igb: reset PHY in the link_up process to recover PHY setting after power down.
authorAkeem G. Abodunrin <akeem.g.abodunrin@intel.com>
Tue, 17 Jul 2012 04:51:18 +0000 (04:51 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sat, 21 Jul 2012 23:07:37 +0000 (16:07 -0700)
There was a previous patch to resolve issue with 82576 losing PHY setting
after PHY power down. However that previous implementation triggered speed
mismatch and occasional link lost. Now, this patch resolves both initial
PHY setting and speed mismatch issues.

Signed-off-by: Akeem G. Abodunrin <akeem.g.abodunrin@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/igb/igb_main.c

index 8adeca9787ca2a1f84503005562a2a92ff6ecab8..1050411e7ca337f8cd28dff367d5cb2e94838ddf 100644 (file)
@@ -1500,11 +1500,12 @@ static void igb_configure(struct igb_adapter *adapter)
  **/
 void igb_power_up_link(struct igb_adapter *adapter)
 {
+       igb_reset_phy(&adapter->hw);
+
        if (adapter->hw.phy.media_type == e1000_media_type_copper)
                igb_power_up_phy_copper(&adapter->hw);
        else
                igb_power_up_serdes_link_82575(&adapter->hw);
-       igb_reset_phy(&adapter->hw);
 }
 
 /**