diff options
author | Alexander Duyck <alexander.h.duyck@intel.com> | 2012-04-19 13:48:48 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2012-05-04 06:25:24 -0400 |
commit | 041441d0f0d885619d48f8f7682825ace523cf59 (patch) | |
tree | c1ddc6cb296a46862093138aa1ada4c2cf8f0d0d /drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | |
parent | 67a79df27163a89fb1ce2191718855288071cbd2 (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_main.c')
-rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index c2ceda9133ba..b2daff3b3328 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | |||
@@ -5250,7 +5250,7 @@ static void ixgbe_watchdog_update_link(struct ixgbe_adapter *adapter) | |||
5250 | struct ixgbe_hw *hw = &adapter->hw; | 5250 | struct ixgbe_hw *hw = &adapter->hw; |
5251 | u32 link_speed = adapter->link_speed; | 5251 | u32 link_speed = adapter->link_speed; |
5252 | bool link_up = adapter->link_up; | 5252 | bool link_up = adapter->link_up; |
5253 | int i; | 5253 | bool pfc_en = adapter->dcb_cfg.pfc_mode_enable; |
5254 | 5254 | ||
5255 | if (!(adapter->flags & IXGBE_FLAG_NEED_LINK_UPDATE)) | 5255 | if (!(adapter->flags & IXGBE_FLAG_NEED_LINK_UPDATE)) |
5256 | return; | 5256 | return; |
@@ -5262,14 +5262,12 @@ static void ixgbe_watchdog_update_link(struct ixgbe_adapter *adapter) | |||
5262 | link_speed = IXGBE_LINK_SPEED_10GB_FULL; | 5262 | link_speed = IXGBE_LINK_SPEED_10GB_FULL; |
5263 | link_up = true; | 5263 | link_up = true; |
5264 | } | 5264 | } |
5265 | if (link_up) { | 5265 | |
5266 | if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) { | 5266 | if (adapter->ixgbe_ieee_pfc) |
5267 | for (i = 0; i < MAX_TRAFFIC_CLASS; i++) | 5267 | pfc_en |= !!(adapter->ixgbe_ieee_pfc->pfc_en); |
5268 | hw->mac.ops.fc_enable(hw, i); | 5268 | |
5269 | } else { | 5269 | if (link_up && !((adapter->flags & IXGBE_FLAG_DCB_ENABLED) && pfc_en)) |
5270 | hw->mac.ops.fc_enable(hw, 0); | 5270 | hw->mac.ops.fc_enable(hw); |
5271 | } | ||
5272 | } | ||
5273 | 5271 | ||
5274 | if (link_up || | 5272 | if (link_up || |
5275 | time_after(jiffies, (adapter->link_check_timeout + | 5273 | time_after(jiffies, (adapter->link_check_timeout + |