summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorBruce Allan <bruce.w.allan@intel.com>2012-12-08 00:35:35 (GMT)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2013-01-27 08:26:54 (GMT)
commit347b5201cb2e8b9e4a20d81582563f51336eb215 (patch)
tree76a1cae21bbbf49965b8ca2f003377c80e6c46f0 /drivers
parenta8fc18910b7f35a59345b5f5cd140c7f64d57d86 (diff)
downloadlinux-347b5201cb2e8b9e4a20d81582563f51336eb215.tar.xz
e1000e: fix flow-control thresholds for jumbo frames on 82579/I217/I218
The previous static flow-control thresholds were causing unnecessary pause packets to be transmitted when jumbo frames are configured reducing the throughput. Signed-off-by: Bruce Allan <bruce.w.allan@intel.com> Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/intel/e1000e/netdev.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/net/ethernet/intel/e1000e/netdev.c b/drivers/net/ethernet/intel/e1000e/netdev.c
index c15b7e4..8bb5d28 100644
--- a/drivers/net/ethernet/intel/e1000e/netdev.c
+++ b/drivers/net/ethernet/intel/e1000e/netdev.c
@@ -3724,14 +3724,17 @@ void e1000e_reset(struct e1000_adapter *adapter)
break;
case e1000_pch2lan:
case e1000_pch_lpt:
- fc->high_water = 0x05C20;
- fc->low_water = 0x05048;
- fc->pause_time = 0x0650;
fc->refresh_time = 0x0400;
- if (adapter->netdev->mtu > ETH_DATA_LEN) {
- pba = 14;
- ew32(PBA, pba);
+
+ if (adapter->netdev->mtu <= ETH_DATA_LEN) {
+ fc->high_water = 0x05C20;
+ fc->low_water = 0x05048;
+ fc->pause_time = 0x0650;
+ break;
}
+
+ fc->high_water = ((pba << 10) * 9 / 10) & E1000_FCRTH_RTH;
+ fc->low_water = ((pba << 10) * 8 / 10) & E1000_FCRTL_RTL;
break;
}