diff options
author | Mark Rustad <mark.d.rustad@intel.com> | 2015-08-08 19:27:51 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2015-09-24 02:04:48 -0400 |
commit | bc1fc64fd2d9093496e5b04c6d94d26bfa629c9c (patch) | |
tree | 5d2b5c5d7e8d61cc2ff1c055a5d60e7b9020fd9c | |
parent | 3507a9b8c9d1684b5095c97f587ee46184e590da (diff) |
ixgbe: Fix FCRTH value in VM-to-VM loopback mode
The 82599 and X540 datasheets require that FCRTH be "set" for Tx
switching (VM-to-VM loopback) but it did not previously specify what
the value should be set to. It has now been determined that
the correct value is RXPBSIZE - (24*1024).
This setting is also required for later devices.
Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | 7 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82599.c | 8 |
2 files changed, 11 insertions, 4 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c index 98e1ddde3104..ce61b36b94f1 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_common.c | |||
@@ -2164,10 +2164,11 @@ s32 ixgbe_fc_enable_generic(struct ixgbe_hw *hw) | |||
2164 | /* | 2164 | /* |
2165 | * In order to prevent Tx hangs when the internal Tx | 2165 | * In order to prevent Tx hangs when the internal Tx |
2166 | * switch is enabled we must set the high water mark | 2166 | * switch is enabled we must set the high water mark |
2167 | * to the maximum FCRTH value. This allows the Tx | 2167 | * to the Rx packet buffer size - 24KB. This allows |
2168 | * switch to function even under heavy Rx workloads. | 2168 | * the Tx switch to function even under heavy Rx |
2169 | * workloads. | ||
2169 | */ | 2170 | */ |
2170 | fcrth = IXGBE_READ_REG(hw, IXGBE_RXPBSIZE(i)) - 32; | 2171 | fcrth = IXGBE_READ_REG(hw, IXGBE_RXPBSIZE(i)) - 24576; |
2171 | } | 2172 | } |
2172 | 2173 | ||
2173 | IXGBE_WRITE_REG(hw, IXGBE_FCRTH_82599(i), fcrth); | 2174 | IXGBE_WRITE_REG(hw, IXGBE_FCRTH_82599(i), fcrth); |
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82599.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82599.c index 3b932fe64ab6..23277ab153b6 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82599.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82599.c | |||
@@ -259,7 +259,13 @@ s32 ixgbe_dcb_config_pfc_82599(struct ixgbe_hw *hw, u8 pfc_en, u8 *prio_tc) | |||
259 | fcrtl = (hw->fc.low_water[i] << 10) | IXGBE_FCRTL_XONE; | 259 | fcrtl = (hw->fc.low_water[i] << 10) | IXGBE_FCRTL_XONE; |
260 | IXGBE_WRITE_REG(hw, IXGBE_FCRTL_82599(i), fcrtl); | 260 | IXGBE_WRITE_REG(hw, IXGBE_FCRTL_82599(i), fcrtl); |
261 | } else { | 261 | } else { |
262 | reg = IXGBE_READ_REG(hw, IXGBE_RXPBSIZE(i)) - 32; | 262 | /* In order to prevent Tx hangs when the internal Tx |
263 | * switch is enabled we must set the high water mark | ||
264 | * to the Rx packet buffer size - 24KB. This allows | ||
265 | * the Tx switch to function even under heavy Rx | ||
266 | * workloads. | ||
267 | */ | ||
268 | reg = IXGBE_READ_REG(hw, IXGBE_RXPBSIZE(i)) - 24576; | ||
263 | IXGBE_WRITE_REG(hw, IXGBE_FCRTL_82599(i), 0); | 269 | IXGBE_WRITE_REG(hw, IXGBE_FCRTL_82599(i), 0); |
264 | } | 270 | } |
265 | 271 | ||