aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe_ethtool.c
diff options
context:
space:
mode:
authorMallikarjuna R Chilakala <mallikarjuna.chilakala@intel.com>2009-06-04 07:11:13 -0400
committerDavid S. Miller <davem@davemloft.net>2009-06-07 08:20:19 -0400
commit620fa036b2459ca9acf7484c8074147f0dda68da (patch)
tree22ed490ea8f6c711c6c6e6779583dee475cc9729 /drivers/net/ixgbe/ixgbe_ethtool.c
parent50ac58ba1d707df33f0c398ae700214e49bf918f (diff)
ixgbe: Fix 82599 adapter link flickering issues
Fix autoneg restart issues in flow control path which might create endless link flickering due to known timing issues with 82599 adapters. Signed-off-by: Mallikarjuna R Chilakala <mallikarjuna.chilakakla@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_ethtool.c')
-rw-r--r--drivers/net/ixgbe/ixgbe_ethtool.c28
1 files changed, 20 insertions, 8 deletions
diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c
index 583cc5a3c4f9..1c110459d33b 100644
--- a/drivers/net/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ixgbe/ixgbe_ethtool.c
@@ -283,6 +283,7 @@ static int ixgbe_set_pauseparam(struct net_device *netdev,
283{ 283{
284 struct ixgbe_adapter *adapter = netdev_priv(netdev); 284 struct ixgbe_adapter *adapter = netdev_priv(netdev);
285 struct ixgbe_hw *hw = &adapter->hw; 285 struct ixgbe_hw *hw = &adapter->hw;
286 struct ixgbe_fc_info fc;
286 287
287#ifdef CONFIG_DCB 288#ifdef CONFIG_DCB
288 if (adapter->dcb_cfg.pfc_mode_enable || 289 if (adapter->dcb_cfg.pfc_mode_enable ||
@@ -291,26 +292,37 @@ static int ixgbe_set_pauseparam(struct net_device *netdev,
291 return -EINVAL; 292 return -EINVAL;
292 293
293#endif 294#endif
295
296 fc = hw->fc;
297
294 if (pause->autoneg != AUTONEG_ENABLE) 298 if (pause->autoneg != AUTONEG_ENABLE)
295 hw->fc.disable_fc_autoneg = true; 299 fc.disable_fc_autoneg = true;
296 else 300 else
297 hw->fc.disable_fc_autoneg = false; 301 fc.disable_fc_autoneg = false;
298 302
299 if (pause->rx_pause && pause->tx_pause) 303 if (pause->rx_pause && pause->tx_pause)
300 hw->fc.requested_mode = ixgbe_fc_full; 304 fc.requested_mode = ixgbe_fc_full;
301 else if (pause->rx_pause && !pause->tx_pause) 305 else if (pause->rx_pause && !pause->tx_pause)
302 hw->fc.requested_mode = ixgbe_fc_rx_pause; 306 fc.requested_mode = ixgbe_fc_rx_pause;
303 else if (!pause->rx_pause && pause->tx_pause) 307 else if (!pause->rx_pause && pause->tx_pause)
304 hw->fc.requested_mode = ixgbe_fc_tx_pause; 308 fc.requested_mode = ixgbe_fc_tx_pause;
305 else if (!pause->rx_pause && !pause->tx_pause) 309 else if (!pause->rx_pause && !pause->tx_pause)
306 hw->fc.requested_mode = ixgbe_fc_none; 310 fc.requested_mode = ixgbe_fc_none;
307 else 311 else
308 return -EINVAL; 312 return -EINVAL;
309 313
310#ifdef CONFIG_DCB 314#ifdef CONFIG_DCB
311 adapter->last_lfc_mode = hw->fc.requested_mode; 315 adapter->last_lfc_mode = fc.requested_mode;
312#endif 316#endif
313 hw->mac.ops.setup_fc(hw, 0); 317
318 /* if the thing changed then we'll update and use new autoneg */
319 if (memcmp(&fc, &hw->fc, sizeof(struct ixgbe_fc_info))) {
320 hw->fc = fc;
321 if (netif_running(netdev))
322 ixgbe_reinit_locked(adapter);
323 else
324 ixgbe_reset(adapter);
325 }
314 326
315 return 0; 327 return 0;
316} 328}