diff options
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_dcb_82598.c')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_dcb_82598.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/net/ixgbe/ixgbe_dcb_82598.c b/drivers/net/ixgbe/ixgbe_dcb_82598.c index 50288bcadc59..9a5e89c12e05 100644 --- a/drivers/net/ixgbe/ixgbe_dcb_82598.c +++ b/drivers/net/ixgbe/ixgbe_dcb_82598.c | |||
@@ -256,21 +256,17 @@ s32 ixgbe_dcb_config_pfc_82598(struct ixgbe_hw *hw, | |||
256 | * for each traffic class. | 256 | * for each traffic class. |
257 | */ | 257 | */ |
258 | for (i = 0; i < MAX_TRAFFIC_CLASS; i++) { | 258 | for (i = 0; i < MAX_TRAFFIC_CLASS; i++) { |
259 | if (dcb_config->rx_pba_cfg == pba_equal) { | 259 | rx_pba_size = IXGBE_READ_REG(hw, IXGBE_RXPBSIZE(i)); |
260 | rx_pba_size = IXGBE_RXPBSIZE_64KB; | 260 | rx_pba_size >>= IXGBE_RXPBSIZE_SHIFT; |
261 | } else { | 261 | reg = (rx_pba_size - hw->fc.low_water) << 10; |
262 | rx_pba_size = (i < 4) ? IXGBE_RXPBSIZE_80KB | ||
263 | : IXGBE_RXPBSIZE_48KB; | ||
264 | } | ||
265 | 262 | ||
266 | reg = ((rx_pba_size >> 5) & 0xFFF0); | ||
267 | if (dcb_config->tc_config[i].dcb_pfc == pfc_enabled_tx || | 263 | if (dcb_config->tc_config[i].dcb_pfc == pfc_enabled_tx || |
268 | dcb_config->tc_config[i].dcb_pfc == pfc_enabled_full) | 264 | dcb_config->tc_config[i].dcb_pfc == pfc_enabled_full) |
269 | reg |= IXGBE_FCRTL_XONE; | 265 | reg |= IXGBE_FCRTL_XONE; |
270 | 266 | ||
271 | IXGBE_WRITE_REG(hw, IXGBE_FCRTL(i), reg); | 267 | IXGBE_WRITE_REG(hw, IXGBE_FCRTL(i), reg); |
272 | 268 | ||
273 | reg = ((rx_pba_size >> 2) & 0xFFF0); | 269 | reg = (rx_pba_size - hw->fc.high_water) << 10; |
274 | if (dcb_config->tc_config[i].dcb_pfc == pfc_enabled_tx || | 270 | if (dcb_config->tc_config[i].dcb_pfc == pfc_enabled_tx || |
275 | dcb_config->tc_config[i].dcb_pfc == pfc_enabled_full) | 271 | dcb_config->tc_config[i].dcb_pfc == pfc_enabled_full) |
276 | reg |= IXGBE_FCRTH_FCEN; | 272 | reg |= IXGBE_FCRTH_FCEN; |