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.c64
1 files changed, 53 insertions, 11 deletions
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index febde45cf9fa..07e778d3e5d2 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -2841,11 +2841,55 @@ static inline bool ixgbe_cache_ring_dcb(struct ixgbe_adapter *adapter)
2841 } 2841 }
2842 ret = true; 2842 ret = true;
2843 } else if (adapter->hw.mac.type == ixgbe_mac_82599EB) { 2843 } else if (adapter->hw.mac.type == ixgbe_mac_82599EB) {
2844 for (i = 0; i < dcb_i; i++) { 2844 if (dcb_i == 8) {
2845 adapter->rx_ring[i].reg_idx = i << 4; 2845 /*
2846 adapter->tx_ring[i].reg_idx = i << 4; 2846 * Tx TC0 starts at: descriptor queue 0
2847 * Tx TC1 starts at: descriptor queue 32
2848 * Tx TC2 starts at: descriptor queue 64
2849 * Tx TC3 starts at: descriptor queue 80
2850 * Tx TC4 starts at: descriptor queue 96
2851 * Tx TC5 starts at: descriptor queue 104
2852 * Tx TC6 starts at: descriptor queue 112
2853 * Tx TC7 starts at: descriptor queue 120
2854 *
2855 * Rx TC0-TC7 are offset by 16 queues each
2856 */
2857 for (i = 0; i < 3; i++) {
2858 adapter->tx_ring[i].reg_idx = i << 5;
2859 adapter->rx_ring[i].reg_idx = i << 4;
2860 }
2861 for ( ; i < 5; i++) {
2862 adapter->tx_ring[i].reg_idx =
2863 ((i + 2) << 4);
2864 adapter->rx_ring[i].reg_idx = i << 4;
2865 }
2866 for ( ; i < dcb_i; i++) {
2867 adapter->tx_ring[i].reg_idx =
2868 ((i + 8) << 3);
2869 adapter->rx_ring[i].reg_idx = i << 4;
2870 }
2871
2872 ret = true;
2873 } else if (dcb_i == 4) {
2874 /*
2875 * Tx TC0 starts at: descriptor queue 0
2876 * Tx TC1 starts at: descriptor queue 64
2877 * Tx TC2 starts at: descriptor queue 96
2878 * Tx TC3 starts at: descriptor queue 112
2879 *
2880 * Rx TC0-TC3 are offset by 32 queues each
2881 */
2882 adapter->tx_ring[0].reg_idx = 0;
2883 adapter->tx_ring[1].reg_idx = 64;
2884 adapter->tx_ring[2].reg_idx = 96;
2885 adapter->tx_ring[3].reg_idx = 112;
2886 for (i = 0 ; i < dcb_i; i++)
2887 adapter->rx_ring[i].reg_idx = i << 5;
2888
2889 ret = true;
2890 } else {
2891 ret = false;
2847 } 2892 }
2848 ret = true;
2849 } else { 2893 } else {
2850 ret = false; 2894 ret = false;
2851 } 2895 }
@@ -3602,6 +3646,8 @@ static int ixgbe_resume(struct pci_dev *pdev)
3602 3646
3603 ixgbe_reset(adapter); 3647 ixgbe_reset(adapter);
3604 3648
3649 IXGBE_WRITE_REG(&adapter->hw, IXGBE_WUS, ~0);
3650
3605 if (netif_running(netdev)) { 3651 if (netif_running(netdev)) {
3606 err = ixgbe_open(adapter->netdev); 3652 err = ixgbe_open(adapter->netdev);
3607 if (err) 3653 if (err)
@@ -3946,7 +3992,7 @@ static void ixgbe_sfp_config_module_task(struct work_struct *work)
3946 } 3992 }
3947 hw->mac.ops.setup_sfp(hw); 3993 hw->mac.ops.setup_sfp(hw);
3948 3994
3949 if (!adapter->flags & IXGBE_FLAG_IN_SFP_LINK_TASK) 3995 if (!(adapter->flags & IXGBE_FLAG_IN_SFP_LINK_TASK))
3950 /* This will also work for DA Twinax connections */ 3996 /* This will also work for DA Twinax connections */
3951 schedule_work(&adapter->multispeed_fiber_task); 3997 schedule_work(&adapter->multispeed_fiber_task);
3952 adapter->flags &= ~IXGBE_FLAG_IN_SFP_MOD_TASK; 3998 adapter->flags &= ~IXGBE_FLAG_IN_SFP_MOD_TASK;
@@ -4531,7 +4577,6 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
4531 const struct ixgbe_info *ii = ixgbe_info_tbl[ent->driver_data]; 4577 const struct ixgbe_info *ii = ixgbe_info_tbl[ent->driver_data];
4532 static int cards_found; 4578 static int cards_found;
4533 int i, err, pci_using_dac; 4579 int i, err, pci_using_dac;
4534 u16 pm_value = 0;
4535 u32 part_num, eec; 4580 u32 part_num, eec;
4536 4581
4537 err = pci_enable_device(pdev); 4582 err = pci_enable_device(pdev);
@@ -4719,11 +4764,8 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
4719 4764
4720 switch (pdev->device) { 4765 switch (pdev->device) {
4721 case IXGBE_DEV_ID_82599_KX4: 4766 case IXGBE_DEV_ID_82599_KX4:
4722#define IXGBE_PCIE_PMCSR 0x44 4767 adapter->wol = (IXGBE_WUFC_MAG | IXGBE_WUFC_EX |
4723 adapter->wol = IXGBE_WUFC_MAG; 4768 IXGBE_WUFC_MC | IXGBE_WUFC_BC);
4724 pci_read_config_word(pdev, IXGBE_PCIE_PMCSR, &pm_value);
4725 pci_write_config_word(pdev, IXGBE_PCIE_PMCSR,
4726 (pm_value | (1 << 8)));
4727 break; 4769 break;
4728 default: 4770 default:
4729 adapter->wol = 0; 4771 adapter->wol = 0;