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>
This commit is contained in:
committed by
David S. Miller
parent
70b77628d8
commit
264857b8fe
@@ -270,6 +270,13 @@ static int ixgbe_set_pauseparam(struct net_device *netdev,
|
||||
struct ixgbe_adapter *adapter = netdev_priv(netdev);
|
||||
struct ixgbe_hw *hw = &adapter->hw;
|
||||
|
||||
#ifdef CONFIG_DCB
|
||||
if (adapter->dcb_cfg.pfc_mode_enable ||
|
||||
((hw->mac.type == ixgbe_mac_82598EB) &&
|
||||
(adapter->flags & IXGBE_FLAG_DCB_ENABLED)))
|
||||
return -EINVAL;
|
||||
|
||||
#endif
|
||||
if (pause->autoneg != AUTONEG_ENABLE)
|
||||
hw->fc.disable_fc_autoneg = true;
|
||||
else
|
||||
@@ -286,6 +293,9 @@ static int ixgbe_set_pauseparam(struct net_device *netdev,
|
||||
else
|
||||
return -EINVAL;
|
||||
|
||||
#ifdef CONFIG_DCB
|
||||
adapter->last_lfc_mode = hw->fc.requested_mode;
|
||||
#endif
|
||||
hw->mac.ops.setup_fc(hw, 0);
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user