Merge branch 'stable-3.2' into pandora-3.2
[pandora-kernel.git] / drivers / net / ethernet / intel / e1000e / ich8lan.c
index e2a80a2..55895af 100644 (file)
@@ -657,6 +657,9 @@ out:
  *  Checks to see of the link status of the hardware has changed.  If a
  *  change in link status has been detected, then we read the PHY registers
  *  to get the current speed/duplex if link exists.
+ *
+ *  Returns a negative error code (-E1000_ERR_*) or 0 (link down) or 1 (link
+ *  up).
  **/
 static s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw)
 {
@@ -672,7 +675,7 @@ static s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw)
         * Change or Rx Sequence Error interrupt.
         */
        if (!mac->get_link_status) {
-               ret_val = 0;
+               ret_val = 1;
                goto out;
        }
 
@@ -743,7 +746,7 @@ static s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw)
         * we have already determined whether we have link or not.
         */
        if (!mac->autoneg) {
-               ret_val = -E1000_ERR_CONFIG;
+               ret_val = 1;
                goto out;
        }
 
@@ -761,9 +764,12 @@ static s32 e1000_check_for_copper_link_ich8lan(struct e1000_hw *hw)
         * different link partner.
         */
        ret_val = e1000e_config_fc_after_link_up(hw);
-       if (ret_val)
+       if (ret_val) {
                e_dbg("Error configuring flow control\n");
+               return ret_val;
+       }
 
+       ret_val = 1;
 out:
        return ret_val;
 }