aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe_ethtool.c
diff options
context:
space:
mode:
authorPeter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>2009-05-17 08:35:16 -0400
committerDavid S. Miller <davem@davemloft.net>2009-05-18 00:04:13 -0400
commit264857b8fe8a16fc95f12e898951fc6bd4bdaa7a (patch)
treeefb090175b49f72170555eab18cdcf1156ed2a4a /drivers/net/ixgbe/ixgbe_ethtool.c
parent70b77628d8d943b27cc0f72002b5884028aee38c (diff)
ixgbe: Allow link flow control in DCB mode for 82599 adapters
82599 supports using either link flow control or priority flow control when in DCB mode. The dcbnl interface already supports sending down configurations through rtnetlink that can enable LFC when DCB is enabled, so the driver should take advantage of this. 82598 does not support using LFC when DCB is enabled, so explicitly disable it when we're in DCB mode. This means we always run in PFC mode when DCB is enabled. Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@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.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c
index 39fb98faffd0..6c7324339ec8 100644
--- a/drivers/net/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ixgbe/ixgbe_ethtool.c
@@ -270,6 +270,13 @@ static int ixgbe_set_pauseparam(struct net_device *netdev,
270 struct ixgbe_adapter *adapter = netdev_priv(netdev); 270 struct ixgbe_adapter *adapter = netdev_priv(netdev);
271 struct ixgbe_hw *hw = &adapter->hw; 271 struct ixgbe_hw *hw = &adapter->hw;
272 272
273#ifdef CONFIG_DCB
274 if (adapter->dcb_cfg.pfc_mode_enable ||
275 ((hw->mac.type == ixgbe_mac_82598EB) &&
276 (adapter->flags & IXGBE_FLAG_DCB_ENABLED)))
277 return -EINVAL;
278
279#endif
273 if (pause->autoneg != AUTONEG_ENABLE) 280 if (pause->autoneg != AUTONEG_ENABLE)
274 hw->fc.disable_fc_autoneg = true; 281 hw->fc.disable_fc_autoneg = true;
275 else 282 else
@@ -286,6 +293,9 @@ static int ixgbe_set_pauseparam(struct net_device *netdev,
286 else 293 else
287 return -EINVAL; 294 return -EINVAL;
288 295
296#ifdef CONFIG_DCB
297 adapter->last_lfc_mode = hw->fc.requested_mode;
298#endif
289 hw->mac.ops.setup_fc(hw, 0); 299 hw->mac.ops.setup_fc(hw, 0);
290 300
291 return 0; 301 return 0;