Skip to content

Commit

Permalink
e1000e: set flow control thresholds properly after enabling/disabling…
Browse files Browse the repository at this point in the history
… pause

When flow control (pause) parameters were changed via ethtool (i.e. enabled
or disabled), the newly calculated thresholds were not being written to the
device for non-fiber media.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Bruce Allan authored and David S. Miller committed Nov 20, 2009
1 parent 842ec8b commit 29afd69
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions drivers/net/e1000e/ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,10 +327,18 @@ static int e1000_set_pauseparam(struct net_device *netdev,

hw->fc.current_mode = hw->fc.requested_mode;

retval = ((hw->phy.media_type == e1000_media_type_fiber) ?
hw->mac.ops.setup_link(hw) : e1000e_force_mac_fc(hw));
if (hw->phy.media_type == e1000_media_type_fiber) {
retval = hw->mac.ops.setup_link(hw);
/* implicit goto out */
} else {
retval = e1000e_force_mac_fc(hw);
if (retval)
goto out;
e1000e_set_fc_watermarks(hw);
}
}

out:
clear_bit(__E1000_RESETTING, &adapter->state);
return retval;
}
Expand Down

0 comments on commit 29afd69

Please sign in to comment.