Commit d405ea3e authored by Alexander Duyck's avatar Alexander Duyck Committed by David S. Miller

igb: correctly offset 82575 flow control watermarks by 16 bytes

The watermark values for the 82575 were not being set correctly.  As a
result the high and low watermark values were set to the same value which
can lead to excess xon/xoff packets being generated.
Signed-off-by: default avatarAlexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8c6af299
...@@ -1306,13 +1306,8 @@ void igb_reset(struct igb_adapter *adapter) ...@@ -1306,13 +1306,8 @@ void igb_reset(struct igb_adapter *adapter)
hwm = min(((pba << 10) * 9 / 10), hwm = min(((pba << 10) * 9 / 10),
((pba << 10) - 2 * adapter->max_frame_size)); ((pba << 10) - 2 * adapter->max_frame_size));
if (mac->type < e1000_82576) {
fc->high_water = hwm & 0xFFF8; /* 8-byte granularity */
fc->low_water = fc->high_water - 8;
} else {
fc->high_water = hwm & 0xFFF0; /* 16-byte granularity */ fc->high_water = hwm & 0xFFF0; /* 16-byte granularity */
fc->low_water = fc->high_water - 16; fc->low_water = fc->high_water - 16;
}
fc->pause_time = 0xFFFF; fc->pause_time = 0xFFFF;
fc->send_xon = 1; fc->send_xon = 1;
fc->current_mode = fc->requested_mode; fc->current_mode = fc->requested_mode;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment