aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82599.c
diff options
context:
space:
mode:
authorAlexander Duyck <alexander.h.duyck@intel.com>2012-04-19 13:48:48 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2012-05-04 06:25:24 -0400
commit041441d0f0d885619d48f8f7682825ace523cf59 (patch)
treec1ddc6cb296a46862093138aa1ada4c2cf8f0d0d /drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82599.c
parent67a79df27163a89fb1ce2191718855288071cbd2 (diff)
ixgbe: Update link flow control to correctly handle multiple packet buffer DCB
This change updates the link flow control configuration so that we correctly set the link flow control settings for DCB. Previously we would have to call the fc_enable call 8 times, once for each packet buffer. If we move that logic into the fc_enable call itself we can avoid multiple unnecessary register writes. This change also corrects an issue in which we were only shifting the water marks for 82599 parts by 6 instead of 10. This was resulting in us only using 1/16 of the packet buffer when flow control was enabled. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82599.c')
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82599.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82599.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82599.c
index 888a419dc3d9..65913c5a616e 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82599.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb_82599.c
@@ -278,18 +278,7 @@ s32 ixgbe_dcb_config_pfc_82599(struct ixgbe_hw *hw, u8 pfc_en, u8 *prio_tc)
278 IXGBE_WRITE_REG(hw, IXGBE_MFLCN, reg); 278 IXGBE_WRITE_REG(hw, IXGBE_MFLCN, reg);
279 279
280 } else { 280 } else {
281 /* X540 devices have a RX bit that should be cleared 281 hw->mac.ops.fc_enable(hw);
282 * if PFC is disabled on all TCs but PFC features is
283 * enabled.
284 */
285 if (hw->mac.type == ixgbe_mac_X540) {
286 reg = IXGBE_READ_REG(hw, IXGBE_MFLCN);
287 reg &= ~IXGBE_MFLCN_RPFCE_MASK;
288 IXGBE_WRITE_REG(hw, IXGBE_MFLCN, reg);
289 }
290
291 for (i = 0; i < MAX_TRAFFIC_CLASS; i++)
292 hw->mac.ops.fc_enable(hw, i);
293 } 282 }
294 283
295 return 0; 284 return 0;