diff options
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_main.c')
-rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index f85631263af8..2bd3eb4ee5a1 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -3347,6 +3347,7 @@ static void ixgbe_napi_disable_all(struct ixgbe_adapter *adapter) | |||
3347 | static void ixgbe_configure_dcb(struct ixgbe_adapter *adapter) | 3347 | static void ixgbe_configure_dcb(struct ixgbe_adapter *adapter) |
3348 | { | 3348 | { |
3349 | struct ixgbe_hw *hw = &adapter->hw; | 3349 | struct ixgbe_hw *hw = &adapter->hw; |
3350 | int max_frame = adapter->netdev->mtu + ETH_HLEN + ETH_FCS_LEN; | ||
3350 | u32 txdctl; | 3351 | u32 txdctl; |
3351 | int i, j; | 3352 | int i, j; |
3352 | 3353 | ||
@@ -3359,8 +3360,15 @@ static void ixgbe_configure_dcb(struct ixgbe_adapter *adapter) | |||
3359 | if (hw->mac.type == ixgbe_mac_82598EB) | 3360 | if (hw->mac.type == ixgbe_mac_82598EB) |
3360 | netif_set_gso_max_size(adapter->netdev, 32768); | 3361 | netif_set_gso_max_size(adapter->netdev, 32768); |
3361 | 3362 | ||
3362 | ixgbe_dcb_calculate_tc_credits(&adapter->dcb_cfg, DCB_TX_CONFIG); | 3363 | #ifdef CONFIG_FCOE |
3363 | ixgbe_dcb_calculate_tc_credits(&adapter->dcb_cfg, DCB_RX_CONFIG); | 3364 | if (adapter->netdev->features & NETIF_F_FCOE_MTU) |
3365 | max_frame = max(max_frame, IXGBE_FCOE_JUMBO_FRAME_SIZE); | ||
3366 | #endif | ||
3367 | |||
3368 | ixgbe_dcb_calculate_tc_credits(&adapter->dcb_cfg, max_frame, | ||
3369 | DCB_TX_CONFIG); | ||
3370 | ixgbe_dcb_calculate_tc_credits(&adapter->dcb_cfg, max_frame, | ||
3371 | DCB_RX_CONFIG); | ||
3364 | 3372 | ||
3365 | /* reconfigure the hardware */ | 3373 | /* reconfigure the hardware */ |
3366 | ixgbe_dcb_hw_config(&adapter->hw, &adapter->dcb_cfg); | 3374 | ixgbe_dcb_hw_config(&adapter->hw, &adapter->dcb_cfg); |