diff options
| -rw-r--r-- | drivers/net/ixgbe/ixgbe.h | 5 | ||||
| -rw-r--r-- | drivers/net/ixgbe/ixgbe_ethtool.c | 188 | ||||
| -rw-r--r-- | drivers/net/ixgbe/ixgbe_main.c | 135 |
3 files changed, 111 insertions, 217 deletions
diff --git a/drivers/net/ixgbe/ixgbe.h b/drivers/net/ixgbe/ixgbe.h index 0d610c73164..e04a8e49e6d 100644 --- a/drivers/net/ixgbe/ixgbe.h +++ b/drivers/net/ixgbe/ixgbe.h | |||
| @@ -587,13 +587,10 @@ extern s32 ixgbe_fdir_erase_perfect_filter_82599(struct ixgbe_hw *hw, | |||
| 587 | u16 soft_id); | 587 | u16 soft_id); |
| 588 | extern void ixgbe_atr_compute_perfect_hash_82599(union ixgbe_atr_input *input, | 588 | extern void ixgbe_atr_compute_perfect_hash_82599(union ixgbe_atr_input *input, |
| 589 | union ixgbe_atr_input *mask); | 589 | union ixgbe_atr_input *mask); |
| 590 | extern void ixgbe_configure_rscctl(struct ixgbe_adapter *adapter, | ||
| 591 | struct ixgbe_ring *ring); | ||
| 592 | extern void ixgbe_clear_rscctl(struct ixgbe_adapter *adapter, | ||
| 593 | struct ixgbe_ring *ring); | ||
| 594 | extern void ixgbe_set_rx_mode(struct net_device *netdev); | 590 | extern void ixgbe_set_rx_mode(struct net_device *netdev); |
| 595 | extern int ixgbe_setup_tc(struct net_device *dev, u8 tc); | 591 | extern int ixgbe_setup_tc(struct net_device *dev, u8 tc); |
| 596 | extern void ixgbe_tx_ctxtdesc(struct ixgbe_ring *, u32, u32, u32, u32); | 592 | extern void ixgbe_tx_ctxtdesc(struct ixgbe_ring *, u32, u32, u32, u32); |
| 593 | extern void ixgbe_do_reset(struct net_device *netdev); | ||
| 597 | #ifdef IXGBE_FCOE | 594 | #ifdef IXGBE_FCOE |
| 598 | extern void ixgbe_configure_fcoe(struct ixgbe_adapter *adapter); | 595 | extern void ixgbe_configure_fcoe(struct ixgbe_adapter *adapter); |
| 599 | extern int ixgbe_fso(struct ixgbe_ring *tx_ring, struct sk_buff *skb, | 596 | extern int ixgbe_fso(struct ixgbe_ring *tx_ring, struct sk_buff *skb, |
diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c index 6035cfa1b4c..dc649553a0a 100644 --- a/drivers/net/ixgbe/ixgbe_ethtool.c +++ b/drivers/net/ixgbe/ixgbe_ethtool.c | |||
| @@ -442,109 +442,6 @@ static int ixgbe_set_pauseparam(struct net_device *netdev, | |||
| 442 | return 0; | 442 | return 0; |
| 443 | } | 443 | } |
| 444 | 444 | ||
| 445 | static void ixgbe_do_reset(struct net_device *netdev) | ||
| 446 | { | ||
| 447 | struct ixgbe_adapter *adapter = netdev_priv(netdev); | ||
| 448 | |||
| 449 | if (netif_running(netdev)) | ||
| 450 | ixgbe_reinit_locked(adapter); | ||
| 451 | else | ||
| 452 | ixgbe_reset(adapter); | ||
| 453 | } | ||
| 454 | |||
| 455 | static u32 ixgbe_get_rx_csum(struct net_device *netdev) | ||
| 456 | { | ||
| 457 | struct ixgbe_adapter *adapter = netdev_priv(netdev); | ||
| 458 | return adapter->flags & IXGBE_FLAG_RX_CSUM_ENABLED; | ||
| 459 | } | ||
| 460 | |||
| 461 | static void ixgbe_set_rsc(struct ixgbe_adapter *adapter) | ||
| 462 | { | ||
| 463 | int i; | ||
| 464 | |||
| 465 | for (i = 0; i < adapter->num_rx_queues; i++) { | ||
| 466 | struct ixgbe_ring *ring = adapter->rx_ring[i]; | ||
| 467 | if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED) { | ||
| 468 | set_ring_rsc_enabled(ring); | ||
| 469 | ixgbe_configure_rscctl(adapter, ring); | ||
| 470 | } else { | ||
| 471 | ixgbe_clear_rscctl(adapter, ring); | ||
| 472 | } | ||
| 473 | } | ||
| 474 | } | ||
| 475 | |||
| 476 | static int ixgbe_set_rx_csum(struct net_device *netdev, u32 data) | ||
| 477 | { | ||
| 478 | struct ixgbe_adapter *adapter = netdev_priv(netdev); | ||
| 479 | bool need_reset = false; | ||
| 480 | |||
| 481 | if (data) { | ||
| 482 | adapter->flags |= IXGBE_FLAG_RX_CSUM_ENABLED; | ||
| 483 | } else { | ||
| 484 | adapter->flags &= ~IXGBE_FLAG_RX_CSUM_ENABLED; | ||
| 485 | |||
| 486 | if (adapter->flags2 & IXGBE_FLAG2_RSC_CAPABLE) { | ||
| 487 | adapter->flags2 &= ~IXGBE_FLAG2_RSC_ENABLED; | ||
| 488 | netdev->features &= ~NETIF_F_LRO; | ||
| 489 | } | ||
| 490 | |||
| 491 | switch (adapter->hw.mac.type) { | ||
| 492 | case ixgbe_mac_X540: | ||
| 493 | ixgbe_set_rsc(adapter); | ||
| 494 | break; | ||
| 495 | case ixgbe_mac_82599EB: | ||
| 496 | need_reset = true; | ||
| 497 | break; | ||
| 498 | default: | ||
| 499 | break; | ||
| 500 | } | ||
| 501 | } | ||
| 502 | |||
| 503 | if (need_reset) | ||
| 504 | ixgbe_do_reset(netdev); | ||
| 505 | |||
| 506 | return 0; | ||
| 507 | } | ||
| 508 | |||
| 509 | static u32 ixgbe_get_tx_csum(struct net_device *netdev) | ||
| 510 | { | ||
| 511 | return (netdev->features & NETIF_F_IP_CSUM) != 0; | ||
| 512 | } | ||
| 513 | |||
| 514 | static int ixgbe_set_tx_csum(struct net_device *netdev, u32 data) | ||
| 515 | { | ||
| 516 | struct ixgbe_adapter *adapter = netdev_priv(netdev); | ||
| 517 | u32 feature_list; | ||
| 518 | |||
| 519 | feature_list = (NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM); | ||
| 520 | switch (adapter->hw.mac.type) { | ||
| 521 | case ixgbe_mac_82599EB: | ||
| 522 | case ixgbe_mac_X540: | ||
| 523 | feature_list |= NETIF_F_SCTP_CSUM; | ||
| 524 | break; | ||
| 525 | default: | ||
| 526 | break; | ||
| 527 | } | ||
| 528 | if (data) | ||
| 529 | netdev->features |= feature_list; | ||
| 530 | else | ||
| 531 | netdev->features &= ~feature_list; | ||
| 532 | |||
| 533 | return 0; | ||
| 534 | } | ||
| 535 | |||
| 536 | static int ixgbe_set_tso(struct net_device *netdev, u32 data) | ||
| 537 | { | ||
| 538 | if (data) { | ||
| 539 | netdev->features |= NETIF_F_TSO; | ||
| 540 | netdev->features |= NETIF_F_TSO6; | ||
| 541 | } else { | ||
| 542 | netdev->features &= ~NETIF_F_TSO; | ||
| 543 | netdev->features &= ~NETIF_F_TSO6; | ||
| 544 | } | ||
| 545 | return 0; | ||
| 546 | } | ||
| 547 | |||
| 548 | static u32 ixgbe_get_msglevel(struct net_device *netdev) | 445 | static u32 ixgbe_get_msglevel(struct net_device *netdev) |
| 549 | { | 446 | { |
| 550 | struct ixgbe_adapter *adapter = netdev_priv(netdev); | 447 | struct ixgbe_adapter *adapter = netdev_priv(netdev); |
| @@ -2289,81 +2186,6 @@ static int ixgbe_set_coalesce(struct net_device *netdev, | |||
| 2289 | return 0; | 2186 | return 0; |
| 2290 | } | 2187 | } |
| 2291 | 2188 | ||
| 2292 | static int ixgbe_set_flags(struct net_device *netdev, u32 data) | ||
| 2293 | { | ||
| 2294 | struct ixgbe_adapter *adapter = netdev_priv(netdev); | ||
| 2295 | bool need_reset = false; | ||
| 2296 | int rc; | ||
| 2297 | |||
| 2298 | #ifdef CONFIG_IXGBE_DCB | ||
| 2299 | if ((adapter->flags & IXGBE_FLAG_DCB_ENABLED) && | ||
| 2300 | !(data & ETH_FLAG_RXVLAN)) | ||
| 2301 | return -EINVAL; | ||
| 2302 | #endif | ||
| 2303 | |||
| 2304 | need_reset = (data & ETH_FLAG_RXVLAN) != | ||
| 2305 | (netdev->features & NETIF_F_HW_VLAN_RX); | ||
| 2306 | |||
| 2307 | if ((data & ETH_FLAG_RXHASH) && | ||
| 2308 | !(adapter->flags & IXGBE_FLAG_RSS_ENABLED)) | ||
| 2309 | return -EOPNOTSUPP; | ||
| 2310 | |||
| 2311 | rc = ethtool_op_set_flags(netdev, data, ETH_FLAG_LRO | ETH_FLAG_NTUPLE | | ||
| 2312 | ETH_FLAG_RXVLAN | ETH_FLAG_TXVLAN | | ||
| 2313 | ETH_FLAG_RXHASH); | ||
| 2314 | if (rc) | ||
| 2315 | return rc; | ||
| 2316 | |||
| 2317 | /* if state changes we need to update adapter->flags and reset */ | ||
| 2318 | if ((adapter->flags2 & IXGBE_FLAG2_RSC_CAPABLE) && | ||
| 2319 | (!!(data & ETH_FLAG_LRO) != | ||
| 2320 | !!(adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED))) { | ||
| 2321 | if ((data & ETH_FLAG_LRO) && | ||
| 2322 | (!adapter->rx_itr_setting || | ||
| 2323 | (adapter->rx_itr_setting > IXGBE_MAX_RSC_INT_RATE))) { | ||
| 2324 | e_info(probe, "rx-usecs set too low, " | ||
| 2325 | "not enabling RSC.\n"); | ||
| 2326 | } else { | ||
| 2327 | adapter->flags2 ^= IXGBE_FLAG2_RSC_ENABLED; | ||
| 2328 | switch (adapter->hw.mac.type) { | ||
| 2329 | case ixgbe_mac_X540: | ||
| 2330 | ixgbe_set_rsc(adapter); | ||
| 2331 | break; | ||
| 2332 | case ixgbe_mac_82599EB: | ||
| 2333 | need_reset = true; | ||
| 2334 | break; | ||
| 2335 | default: | ||
| 2336 | break; | ||
| 2337 | } | ||
| 2338 | } | ||
| 2339 | } | ||
| 2340 | |||
| 2341 | /* | ||
| 2342 | * Check if Flow Director n-tuple support was enabled or disabled. If | ||
| 2343 | * the state changed, we need to reset. | ||
| 2344 | */ | ||
| 2345 | if (!(adapter->flags & IXGBE_FLAG_FDIR_PERFECT_CAPABLE)) { | ||
| 2346 | /* turn off ATR, enable perfect filters and reset */ | ||
| 2347 | if (data & ETH_FLAG_NTUPLE) { | ||
| 2348 | adapter->flags &= ~IXGBE_FLAG_FDIR_HASH_CAPABLE; | ||
| 2349 | adapter->flags |= IXGBE_FLAG_FDIR_PERFECT_CAPABLE; | ||
| 2350 | need_reset = true; | ||
| 2351 | } | ||
| 2352 | } else if (!(data & ETH_FLAG_NTUPLE)) { | ||
| 2353 | /* turn off Flow Director, set ATR and reset */ | ||
| 2354 | adapter->flags &= ~IXGBE_FLAG_FDIR_PERFECT_CAPABLE; | ||
| 2355 | if ((adapter->flags & IXGBE_FLAG_RSS_ENABLED) && | ||
| 2356 | !(adapter->flags & IXGBE_FLAG_DCB_ENABLED)) | ||
| 2357 | adapter->flags |= IXGBE_FLAG_FDIR_HASH_CAPABLE; | ||
| 2358 | need_reset = true; | ||
| 2359 | } | ||
| 2360 | |||
| 2361 | if (need_reset) | ||
| 2362 | ixgbe_do_reset(netdev); | ||
| 2363 | |||
| 2364 | return 0; | ||
| 2365 | } | ||
| 2366 | |||
| 2367 | static int ixgbe_get_ethtool_fdir_entry(struct ixgbe_adapter *adapter, | 2189 | static int ixgbe_get_ethtool_fdir_entry(struct ixgbe_adapter *adapter, |
| 2368 | struct ethtool_rxnfc *cmd) | 2190 | struct ethtool_rxnfc *cmd) |
| 2369 | { | 2191 | { |
| @@ -2746,16 +2568,8 @@ static const struct ethtool_ops ixgbe_ethtool_ops = { | |||
| 2746 | .set_ringparam = ixgbe_set_ringparam, | 2568 | .set_ringparam = ixgbe_set_ringparam, |
| 2747 | .get_pauseparam = ixgbe_get_pauseparam, | 2569 | .get_pauseparam = ixgbe_get_pauseparam, |
| 2748 | .set_pauseparam = ixgbe_set_pauseparam, | 2570 | .set_pauseparam = ixgbe_set_pauseparam, |
| 2749 | .get_rx_csum = ixgbe_get_rx_csum, | ||
| 2750 | .set_rx_csum = ixgbe_set_rx_csum, | ||
| 2751 | .get_tx_csum = ixgbe_get_tx_csum, | ||
| 2752 | .set_tx_csum = ixgbe_set_tx_csum, | ||
| 2753 | .get_sg = ethtool_op_get_sg, | ||
| 2754 | .set_sg = ethtool_op_set_sg, | ||
| 2755 | .get_msglevel = ixgbe_get_msglevel, | 2571 | .get_msglevel = ixgbe_get_msglevel, |
| 2756 | .set_msglevel = ixgbe_set_msglevel, | 2572 | .set_msglevel = ixgbe_set_msglevel, |
| 2757 | .get_tso = ethtool_op_get_tso, | ||
| 2758 | .set_tso = ixgbe_set_tso, | ||
| 2759 | .self_test = ixgbe_diag_test, | 2573 | .self_test = ixgbe_diag_test, |
| 2760 | .get_strings = ixgbe_get_strings, | 2574 | .get_strings = ixgbe_get_strings, |
| 2761 | .set_phys_id = ixgbe_set_phys_id, | 2575 | .set_phys_id = ixgbe_set_phys_id, |
| @@ -2763,8 +2577,6 @@ static const struct ethtool_ops ixgbe_ethtool_ops = { | |||
| 2763 | .get_ethtool_stats = ixgbe_get_ethtool_stats, | 2577 | .get_ethtool_stats = ixgbe_get_ethtool_stats, |
| 2764 | .get_coalesce = ixgbe_get_coalesce, | 2578 | .get_coalesce = ixgbe_get_coalesce, |
| 2765 | .set_coalesce = ixgbe_set_coalesce, | 2579 | .set_coalesce = ixgbe_set_coalesce, |
| 2766 | .get_flags = ethtool_op_get_flags, | ||
| 2767 | .set_flags = ixgbe_set_flags, | ||
| 2768 | .get_rxnfc = ixgbe_get_rxnfc, | 2580 | .get_rxnfc = ixgbe_get_rxnfc, |
| 2769 | .set_rxnfc = ixgbe_set_rxnfc, | 2581 | .set_rxnfc = ixgbe_set_rxnfc, |
| 2770 | }; | 2582 | }; |
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index c6fa9c7eb73..1be617545dc 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
| @@ -2862,28 +2862,11 @@ static void ixgbe_setup_mrqc(struct ixgbe_adapter *adapter) | |||
| 2862 | } | 2862 | } |
| 2863 | 2863 | ||
| 2864 | /** | 2864 | /** |
| 2865 | * ixgbe_clear_rscctl - disable RSC for the indicated ring | ||
| 2866 | * @adapter: address of board private structure | ||
| 2867 | * @ring: structure containing ring specific data | ||
| 2868 | **/ | ||
| 2869 | void ixgbe_clear_rscctl(struct ixgbe_adapter *adapter, | ||
| 2870 | struct ixgbe_ring *ring) | ||
| 2871 | { | ||
| 2872 | struct ixgbe_hw *hw = &adapter->hw; | ||
| 2873 | u32 rscctrl; | ||
| 2874 | u8 reg_idx = ring->reg_idx; | ||
| 2875 | |||
| 2876 | rscctrl = IXGBE_READ_REG(hw, IXGBE_RSCCTL(reg_idx)); | ||
| 2877 | rscctrl &= ~IXGBE_RSCCTL_RSCEN; | ||
| 2878 | IXGBE_WRITE_REG(hw, IXGBE_RSCCTL(reg_idx), rscctrl); | ||
| 2879 | } | ||
| 2880 | |||
| 2881 | /** | ||
| 2882 | * ixgbe_configure_rscctl - enable RSC for the indicated ring | 2865 | * ixgbe_configure_rscctl - enable RSC for the indicated ring |
| 2883 | * @adapter: address of board private structure | 2866 | * @adapter: address of board private structure |
| 2884 | * @index: index of ring to set | 2867 | * @index: index of ring to set |
| 2885 | **/ | 2868 | **/ |
| 2886 | void ixgbe_configure_rscctl(struct ixgbe_adapter *adapter, | 2869 | static void ixgbe_configure_rscctl(struct ixgbe_adapter *adapter, |
| 2887 | struct ixgbe_ring *ring) | 2870 | struct ixgbe_ring *ring) |
| 2888 | { | 2871 | { |
| 2889 | struct ixgbe_hw *hw = &adapter->hw; | 2872 | struct ixgbe_hw *hw = &adapter->hw; |
| @@ -7122,6 +7105,98 @@ int ixgbe_setup_tc(struct net_device *dev, u8 tc) | |||
| 7122 | return 0; | 7105 | return 0; |
| 7123 | } | 7106 | } |
| 7124 | 7107 | ||
| 7108 | void ixgbe_do_reset(struct net_device *netdev) | ||
| 7109 | { | ||
| 7110 | struct ixgbe_adapter *adapter = netdev_priv(netdev); | ||
| 7111 | |||
| 7112 | if (netif_running(netdev)) | ||
| 7113 | ixgbe_reinit_locked(adapter); | ||
| 7114 | else | ||
| 7115 | ixgbe_reset(adapter); | ||
| 7116 | } | ||
| 7117 | |||
| 7118 | static u32 ixgbe_fix_features(struct net_device *netdev, u32 data) | ||
| 7119 | { | ||
| 7120 | struct ixgbe_adapter *adapter = netdev_priv(netdev); | ||
| 7121 | |||
| 7122 | #ifdef CONFIG_DCB | ||
| 7123 | if (adapter->flags & IXGBE_FLAG_DCB_ENABLED) | ||
| 7124 | data &= ~NETIF_F_HW_VLAN_RX; | ||
| 7125 | #endif | ||
| 7126 | |||
| 7127 | /* return error if RXHASH is being enabled when RSS is not supported */ | ||
| 7128 | if (!(adapter->flags & IXGBE_FLAG_RSS_ENABLED)) | ||
| 7129 | data &= ~NETIF_F_RXHASH; | ||
| 7130 | |||
| 7131 | /* If Rx checksum is disabled, then RSC/LRO should also be disabled */ | ||
| 7132 | if (!(data & NETIF_F_RXCSUM)) | ||
| 7133 | data &= ~NETIF_F_LRO; | ||
| 7134 | |||
| 7135 | /* Turn off LRO if not RSC capable or invalid ITR settings */ | ||
| 7136 | if (!(adapter->flags2 & IXGBE_FLAG2_RSC_CAPABLE)) { | ||
| 7137 | data &= ~NETIF_F_LRO; | ||
| 7138 | } else if (!(adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED) && | ||
| 7139 | (adapter->rx_itr_setting != 1 && | ||
| 7140 | adapter->rx_itr_setting > IXGBE_MAX_RSC_INT_RATE)) { | ||
| 7141 | data &= ~NETIF_F_LRO; | ||
| 7142 | e_info(probe, "rx-usecs set too low, not enabling RSC\n"); | ||
| 7143 | } | ||
| 7144 | |||
| 7145 | return data; | ||
| 7146 | } | ||
| 7147 | |||
| 7148 | static int ixgbe_set_features(struct net_device *netdev, u32 data) | ||
| 7149 | { | ||
| 7150 | struct ixgbe_adapter *adapter = netdev_priv(netdev); | ||
| 7151 | bool need_reset = false; | ||
| 7152 | |||
| 7153 | /* If Rx checksum is disabled, then RSC/LRO should also be disabled */ | ||
| 7154 | if (!(data & NETIF_F_RXCSUM)) | ||
| 7155 | adapter->flags &= ~IXGBE_FLAG_RX_CSUM_ENABLED; | ||
| 7156 | else | ||
| 7157 | adapter->flags |= IXGBE_FLAG_RX_CSUM_ENABLED; | ||
| 7158 | |||
| 7159 | /* Make sure RSC matches LRO, reset if change */ | ||
| 7160 | if (!!(data & NETIF_F_LRO) != | ||
| 7161 | !!(adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED)) { | ||
| 7162 | adapter->flags2 ^= IXGBE_FLAG2_RSC_ENABLED; | ||
| 7163 | switch (adapter->hw.mac.type) { | ||
| 7164 | case ixgbe_mac_X540: | ||
| 7165 | case ixgbe_mac_82599EB: | ||
| 7166 | need_reset = true; | ||
| 7167 | break; | ||
| 7168 | default: | ||
| 7169 | break; | ||
| 7170 | } | ||
| 7171 | } | ||
| 7172 | |||
| 7173 | /* | ||
| 7174 | * Check if Flow Director n-tuple support was enabled or disabled. If | ||
| 7175 | * the state changed, we need to reset. | ||
| 7176 | */ | ||
| 7177 | if (!(adapter->flags & IXGBE_FLAG_FDIR_PERFECT_CAPABLE)) { | ||
| 7178 | /* turn off ATR, enable perfect filters and reset */ | ||
| 7179 | if (data & NETIF_F_NTUPLE) { | ||
| 7180 | adapter->flags &= ~IXGBE_FLAG_FDIR_HASH_CAPABLE; | ||
| 7181 | adapter->flags |= IXGBE_FLAG_FDIR_PERFECT_CAPABLE; | ||
| 7182 | need_reset = true; | ||
| 7183 | } | ||
| 7184 | } else if (!(data & NETIF_F_NTUPLE)) { | ||
| 7185 | /* turn off Flow Director, set ATR and reset */ | ||
| 7186 | adapter->flags &= ~IXGBE_FLAG_FDIR_PERFECT_CAPABLE; | ||
| 7187 | if ((adapter->flags & IXGBE_FLAG_RSS_ENABLED) && | ||
| 7188 | !(adapter->flags & IXGBE_FLAG_DCB_ENABLED)) | ||
| 7189 | adapter->flags |= IXGBE_FLAG_FDIR_HASH_CAPABLE; | ||
| 7190 | need_reset = true; | ||
| 7191 | } | ||
| 7192 | |||
| 7193 | if (need_reset) | ||
| 7194 | ixgbe_do_reset(netdev); | ||
| 7195 | |||
| 7196 | return 0; | ||
| 7197 | |||
| 7198 | } | ||
| 7199 | |||
| 7125 | static const struct net_device_ops ixgbe_netdev_ops = { | 7200 | static const struct net_device_ops ixgbe_netdev_ops = { |
| 7126 | .ndo_open = ixgbe_open, | 7201 | .ndo_open = ixgbe_open, |
| 7127 | .ndo_stop = ixgbe_close, | 7202 | .ndo_stop = ixgbe_close, |
| @@ -7153,6 +7228,8 @@ static const struct net_device_ops ixgbe_netdev_ops = { | |||
| 7153 | .ndo_fcoe_disable = ixgbe_fcoe_disable, | 7228 | .ndo_fcoe_disable = ixgbe_fcoe_disable, |
| 7154 | .ndo_fcoe_get_wwn = ixgbe_fcoe_get_wwn, | 7229 | .ndo_fcoe_get_wwn = ixgbe_fcoe_get_wwn, |
| 7155 | #endif /* IXGBE_FCOE */ | 7230 | #endif /* IXGBE_FCOE */ |
| 7231 | .ndo_set_features = ixgbe_set_features, | ||
| 7232 | .ndo_fix_features = ixgbe_fix_features, | ||
| 7156 | }; | 7233 | }; |
| 7157 | 7234 | ||
| 7158 | static void __devinit ixgbe_probe_vf(struct ixgbe_adapter *adapter, | 7235 | static void __devinit ixgbe_probe_vf(struct ixgbe_adapter *adapter, |
| @@ -7420,20 +7497,24 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, | |||
| 7420 | 7497 | ||
| 7421 | netdev->features = NETIF_F_SG | | 7498 | netdev->features = NETIF_F_SG | |
| 7422 | NETIF_F_IP_CSUM | | 7499 | NETIF_F_IP_CSUM | |
| 7500 | NETIF_F_IPV6_CSUM | | ||
| 7423 | NETIF_F_HW_VLAN_TX | | 7501 | NETIF_F_HW_VLAN_TX | |
| 7424 | NETIF_F_HW_VLAN_RX | | 7502 | NETIF_F_HW_VLAN_RX | |
| 7425 | NETIF_F_HW_VLAN_FILTER; | 7503 | NETIF_F_HW_VLAN_FILTER | |
| 7504 | NETIF_F_TSO | | ||
| 7505 | NETIF_F_TSO6 | | ||
| 7506 | NETIF_F_GRO | | ||
| 7507 | NETIF_F_RXHASH | | ||
| 7508 | NETIF_F_RXCSUM; | ||
| 7426 | 7509 | ||
| 7427 | netdev->features |= NETIF_F_IPV6_CSUM; | 7510 | netdev->hw_features = netdev->features; |
| 7428 | netdev->features |= NETIF_F_TSO; | ||
| 7429 | netdev->features |= NETIF_F_TSO6; | ||
| 7430 | netdev->features |= NETIF_F_GRO; | ||
| 7431 | netdev->features |= NETIF_F_RXHASH; | ||
| 7432 | 7511 | ||
| 7433 | switch (adapter->hw.mac.type) { | 7512 | switch (adapter->hw.mac.type) { |
| 7434 | case ixgbe_mac_82599EB: | 7513 | case ixgbe_mac_82599EB: |
| 7435 | case ixgbe_mac_X540: | 7514 | case ixgbe_mac_X540: |
| 7436 | netdev->features |= NETIF_F_SCTP_CSUM; | 7515 | netdev->features |= NETIF_F_SCTP_CSUM; |
| 7516 | netdev->hw_features |= NETIF_F_SCTP_CSUM | | ||
| 7517 | NETIF_F_NTUPLE; | ||
| 7437 | break; | 7518 | break; |
| 7438 | default: | 7519 | default: |
| 7439 | break; | 7520 | break; |
| @@ -7472,6 +7553,8 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, | |||
| 7472 | netdev->vlan_features |= NETIF_F_HIGHDMA; | 7553 | netdev->vlan_features |= NETIF_F_HIGHDMA; |
| 7473 | } | 7554 | } |
| 7474 | 7555 | ||
| 7556 | if (adapter->flags2 & IXGBE_FLAG2_RSC_CAPABLE) | ||
| 7557 | netdev->hw_features |= NETIF_F_LRO; | ||
| 7475 | if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED) | 7558 | if (adapter->flags2 & IXGBE_FLAG2_RSC_ENABLED) |
| 7476 | netdev->features |= NETIF_F_LRO; | 7559 | netdev->features |= NETIF_F_LRO; |
| 7477 | 7560 | ||
| @@ -7508,8 +7591,10 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev, | |||
| 7508 | if (err) | 7591 | if (err) |
| 7509 | goto err_sw_init; | 7592 | goto err_sw_init; |
| 7510 | 7593 | ||
| 7511 | if (!(adapter->flags & IXGBE_FLAG_RSS_ENABLED)) | 7594 | if (!(adapter->flags & IXGBE_FLAG_RSS_ENABLED)) { |
| 7595 | netdev->hw_features &= ~NETIF_F_RXHASH; | ||
| 7512 | netdev->features &= ~NETIF_F_RXHASH; | 7596 | netdev->features &= ~NETIF_F_RXHASH; |
| 7597 | } | ||
| 7513 | 7598 | ||
| 7514 | switch (pdev->device) { | 7599 | switch (pdev->device) { |
| 7515 | case IXGBE_DEV_ID_82599_SFP: | 7600 | case IXGBE_DEV_ID_82599_SFP: |
