aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c30
1 files changed, 20 insertions, 10 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index be2e145646bf..38f9758c4c44 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -3658,15 +3658,6 @@ static void ixgbe_configure_dcb(struct ixgbe_adapter *adapter)
3658 if (hw->mac.type == ixgbe_mac_82598EB) 3658 if (hw->mac.type == ixgbe_mac_82598EB)
3659 netif_set_gso_max_size(adapter->netdev, 32768); 3659 netif_set_gso_max_size(adapter->netdev, 32768);
3660 3660
3661#ifdef CONFIG_FCOE
3662 if (adapter->netdev->features & NETIF_F_FCOE_MTU)
3663 max_frame = max(max_frame, IXGBE_FCOE_JUMBO_FRAME_SIZE);
3664#endif
3665
3666 ixgbe_dcb_calculate_tc_credits(hw, &adapter->dcb_cfg, max_frame,
3667 DCB_TX_CONFIG);
3668 ixgbe_dcb_calculate_tc_credits(hw, &adapter->dcb_cfg, max_frame,
3669 DCB_RX_CONFIG);
3670 3661
3671 /* Enable VLAN tag insert/strip */ 3662 /* Enable VLAN tag insert/strip */
3672 adapter->netdev->features |= NETIF_F_HW_VLAN_RX; 3663 adapter->netdev->features |= NETIF_F_HW_VLAN_RX;
@@ -3674,7 +3665,26 @@ static void ixgbe_configure_dcb(struct ixgbe_adapter *adapter)
3674 hw->mac.ops.set_vfta(&adapter->hw, 0, 0, true); 3665 hw->mac.ops.set_vfta(&adapter->hw, 0, 0, true);
3675 3666
3676 /* reconfigure the hardware */ 3667 /* reconfigure the hardware */
3677 ixgbe_dcb_hw_config(hw, &adapter->dcb_cfg); 3668 if (adapter->dcbx_cap & (DCB_CAP_DCBX_HOST | DCB_CAP_DCBX_VER_CEE)) {
3669#ifdef CONFIG_FCOE
3670 if (adapter->netdev->features & NETIF_F_FCOE_MTU)
3671 max_frame = max(max_frame, IXGBE_FCOE_JUMBO_FRAME_SIZE);
3672#endif
3673 ixgbe_dcb_calculate_tc_credits(hw, &adapter->dcb_cfg, max_frame,
3674 DCB_TX_CONFIG);
3675 ixgbe_dcb_calculate_tc_credits(hw, &adapter->dcb_cfg, max_frame,
3676 DCB_RX_CONFIG);
3677 ixgbe_dcb_hw_config(hw, &adapter->dcb_cfg);
3678 } else {
3679 struct net_device *dev = adapter->netdev;
3680
3681 if (adapter->ixgbe_ieee_ets)
3682 dev->dcbnl_ops->ieee_setets(dev,
3683 adapter->ixgbe_ieee_ets);
3684 if (adapter->ixgbe_ieee_pfc)
3685 dev->dcbnl_ops->ieee_setpfc(dev,
3686 adapter->ixgbe_ieee_pfc);
3687 }
3678 3688
3679 /* Enable RSS Hash per TC */ 3689 /* Enable RSS Hash per TC */
3680 if (hw->mac.type != ixgbe_mac_82598EB) { 3690 if (hw->mac.type != ixgbe_mac_82598EB) {