aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ixgbe/ixgbe_main.c')
-rw-r--r--drivers/net/ixgbe/ixgbe_main.c52
1 files changed, 34 insertions, 18 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 30f9ccfb4f8..32231ffe071 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -1,7 +1,7 @@
1/******************************************************************************* 1/*******************************************************************************
2 2
3 Intel 10 Gigabit PCI Express Linux driver 3 Intel 10 Gigabit PCI Express Linux driver
4 Copyright(c) 1999 - 2010 Intel Corporation. 4 Copyright(c) 1999 - 2011 Intel Corporation.
5 5
6 This program is free software; you can redistribute it and/or modify it 6 This program is free software; you can redistribute it and/or modify it
7 under the terms and conditions of the GNU General Public License, 7 under the terms and conditions of the GNU General Public License,
@@ -54,7 +54,8 @@ static const char ixgbe_driver_string[] =
54 54
55#define DRV_VERSION "3.2.9-k2" 55#define DRV_VERSION "3.2.9-k2"
56const char ixgbe_driver_version[] = DRV_VERSION; 56const char ixgbe_driver_version[] = DRV_VERSION;
57static char ixgbe_copyright[] = "Copyright (c) 1999-2010 Intel Corporation."; 57static const char ixgbe_copyright[] =
58 "Copyright (c) 1999-2011 Intel Corporation.";
58 59
59static const struct ixgbe_info *ixgbe_info_tbl[] = { 60static const struct ixgbe_info *ixgbe_info_tbl[] = {
60 [board_82598] = &ixgbe_82598_info, 61 [board_82598] = &ixgbe_82598_info,
@@ -648,7 +649,7 @@ void ixgbe_unmap_and_free_tx_resource(struct ixgbe_ring *tx_ring,
648 * 649 *
649 * Returns : a tc index for use in range 0-7, or 0-3 650 * Returns : a tc index for use in range 0-7, or 0-3
650 */ 651 */
651u8 ixgbe_dcb_txq_to_tc(struct ixgbe_adapter *adapter, u8 reg_idx) 652static u8 ixgbe_dcb_txq_to_tc(struct ixgbe_adapter *adapter, u8 reg_idx)
652{ 653{
653 int tc = -1; 654 int tc = -1;
654 int dcb_i = adapter->ring_feature[RING_F_DCB].indices; 655 int dcb_i = adapter->ring_feature[RING_F_DCB].indices;
@@ -2597,6 +2598,11 @@ static void ixgbe_free_irq(struct ixgbe_adapter *adapter)
2597 2598
2598 i--; 2599 i--;
2599 for (; i >= 0; i--) { 2600 for (; i >= 0; i--) {
2601 /* free only the irqs that were actually requested */
2602 if (!adapter->q_vector[i]->rxr_count &&
2603 !adapter->q_vector[i]->txr_count)
2604 continue;
2605
2600 free_irq(adapter->msix_entries[i].vector, 2606 free_irq(adapter->msix_entries[i].vector,
2601 adapter->q_vector[i]); 2607 adapter->q_vector[i]);
2602 } 2608 }
@@ -3077,6 +3083,14 @@ void ixgbe_configure_rx_ring(struct ixgbe_adapter *adapter,
3077 ixgbe_configure_srrctl(adapter, ring); 3083 ixgbe_configure_srrctl(adapter, ring);
3078 ixgbe_configure_rscctl(adapter, ring); 3084 ixgbe_configure_rscctl(adapter, ring);
3079 3085
3086 /* If operating in IOV mode set RLPML for X540 */
3087 if ((adapter->flags & IXGBE_FLAG_SRIOV_ENABLED) &&
3088 hw->mac.type == ixgbe_mac_X540) {
3089 rxdctl &= ~IXGBE_RXDCTL_RLPMLMASK;
3090 rxdctl |= ((ring->netdev->mtu + ETH_HLEN +
3091 ETH_FCS_LEN + VLAN_HLEN) | IXGBE_RXDCTL_RLPML_EN);
3092 }
3093
3080 if (hw->mac.type == ixgbe_mac_82598EB) { 3094 if (hw->mac.type == ixgbe_mac_82598EB) {
3081 /* 3095 /*
3082 * enable cache line friendly hardware writes: 3096 * enable cache line friendly hardware writes:
@@ -3876,7 +3890,7 @@ static int ixgbe_up_complete(struct ixgbe_adapter *adapter)
3876 * If we're not hot-pluggable SFP+, we just need to configure link 3890 * If we're not hot-pluggable SFP+, we just need to configure link
3877 * and bring it up. 3891 * and bring it up.
3878 */ 3892 */
3879 if (hw->phy.type == ixgbe_phy_unknown) 3893 if (hw->phy.type == ixgbe_phy_none)
3880 schedule_work(&adapter->sfp_config_module_task); 3894 schedule_work(&adapter->sfp_config_module_task);
3881 3895
3882 /* enable transmits */ 3896 /* enable transmits */
@@ -5174,7 +5188,6 @@ static int __devinit ixgbe_sw_init(struct ixgbe_adapter *adapter)
5174 adapter->dcb_cfg.bw_percentage[DCB_RX_CONFIG][0] = 100; 5188 adapter->dcb_cfg.bw_percentage[DCB_RX_CONFIG][0] = 100;
5175 adapter->dcb_cfg.rx_pba_cfg = pba_equal; 5189 adapter->dcb_cfg.rx_pba_cfg = pba_equal;
5176 adapter->dcb_cfg.pfc_mode_enable = false; 5190 adapter->dcb_cfg.pfc_mode_enable = false;
5177 adapter->dcb_cfg.round_robin_enable = false;
5178 adapter->dcb_set_bitmap = 0x00; 5191 adapter->dcb_set_bitmap = 0x00;
5179 ixgbe_copy_dcb_cfg(&adapter->dcb_cfg, &adapter->temp_dcb_cfg, 5192 ixgbe_copy_dcb_cfg(&adapter->dcb_cfg, &adapter->temp_dcb_cfg,
5180 adapter->ring_feature[RING_F_DCB].indices); 5193 adapter->ring_feature[RING_F_DCB].indices);
@@ -5442,8 +5455,14 @@ static int ixgbe_change_mtu(struct net_device *netdev, int new_mtu)
5442 int max_frame = new_mtu + ETH_HLEN + ETH_FCS_LEN; 5455 int max_frame = new_mtu + ETH_HLEN + ETH_FCS_LEN;
5443 5456
5444 /* MTU < 68 is an error and causes problems on some kernels */ 5457 /* MTU < 68 is an error and causes problems on some kernels */
5445 if ((new_mtu < 68) || (max_frame > IXGBE_MAX_JUMBO_FRAME_SIZE)) 5458 if (adapter->flags & IXGBE_FLAG_SRIOV_ENABLED &&
5446 return -EINVAL; 5459 hw->mac.type != ixgbe_mac_X540) {
5460 if ((new_mtu < 68) || (max_frame > MAXIMUM_ETHERNET_VLAN_SIZE))
5461 return -EINVAL;
5462 } else {
5463 if ((new_mtu < 68) || (max_frame > IXGBE_MAX_JUMBO_FRAME_SIZE))
5464 return -EINVAL;
5465 }
5447 5466
5448 e_info(probe, "changing MTU from %d to %d\n", netdev->mtu, new_mtu); 5467 e_info(probe, "changing MTU from %d to %d\n", netdev->mtu, new_mtu);
5449 /* must set new MTU before calling down or up */ 5468 /* must set new MTU before calling down or up */
@@ -5611,6 +5630,10 @@ static int __ixgbe_shutdown(struct pci_dev *pdev, bool *enable_wake)
5611 } 5630 }
5612 5631
5613 ixgbe_clear_interrupt_scheme(adapter); 5632 ixgbe_clear_interrupt_scheme(adapter);
5633#ifdef CONFIG_DCB
5634 kfree(adapter->ixgbe_ieee_pfc);
5635 kfree(adapter->ixgbe_ieee_ets);
5636#endif
5614 5637
5615#ifdef CONFIG_PM 5638#ifdef CONFIG_PM
5616 retval = pci_save_state(pdev); 5639 retval = pci_save_state(pdev);
@@ -6101,7 +6124,10 @@ static void ixgbe_watchdog_task(struct work_struct *work)
6101 (link_speed == IXGBE_LINK_SPEED_10GB_FULL ? 6124 (link_speed == IXGBE_LINK_SPEED_10GB_FULL ?
6102 "10 Gbps" : 6125 "10 Gbps" :
6103 (link_speed == IXGBE_LINK_SPEED_1GB_FULL ? 6126 (link_speed == IXGBE_LINK_SPEED_1GB_FULL ?
6104 "1 Gbps" : "unknown speed")), 6127 "1 Gbps" :
6128 (link_speed == IXGBE_LINK_SPEED_100_FULL ?
6129 "100 Mbps" :
6130 "unknown speed"))),
6105 ((flow_rx && flow_tx) ? "RX/TX" : 6131 ((flow_rx && flow_tx) ? "RX/TX" :
6106 (flow_rx ? "RX" : 6132 (flow_rx ? "RX" :
6107 (flow_tx ? "TX" : "None")))); 6133 (flow_tx ? "TX" : "None"))));
@@ -7706,16 +7732,6 @@ static int ixgbe_notify_dca(struct notifier_block *nb, unsigned long event,
7706 7732
7707#endif /* CONFIG_IXGBE_DCA */ 7733#endif /* CONFIG_IXGBE_DCA */
7708 7734
7709/**
7710 * ixgbe_get_hw_dev return device
7711 * used by hardware layer to print debugging information
7712 **/
7713struct net_device *ixgbe_get_hw_dev(struct ixgbe_hw *hw)
7714{
7715 struct ixgbe_adapter *adapter = hw->back;
7716 return adapter->netdev;
7717}
7718
7719module_exit(ixgbe_exit_module); 7735module_exit(ixgbe_exit_module);
7720 7736
7721/* ixgbe_main.c */ 7737/* ixgbe_main.c */