mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-03-07 04:00:15 +00:00
e1000e: set flow control thresholds properly after enabling/disabling 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>
This commit is contained in:
parent
842ec8b64a
commit
29afd69063
@ -327,10 +327,18 @@ static int e1000_set_pauseparam(struct net_device *netdev,
|
|||||||
|
|
||||||
hw->fc.current_mode = hw->fc.requested_mode;
|
hw->fc.current_mode = hw->fc.requested_mode;
|
||||||
|
|
||||||
retval = ((hw->phy.media_type == e1000_media_type_fiber) ?
|
if (hw->phy.media_type == e1000_media_type_fiber) {
|
||||||
hw->mac.ops.setup_link(hw) : e1000e_force_mac_fc(hw));
|
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);
|
clear_bit(__E1000_RESETTING, &adapter->state);
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user