aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/igb/igb_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/igb/igb_main.c')
-rw-r--r--drivers/net/igb/igb_main.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/drivers/net/igb/igb_main.c b/drivers/net/igb/igb_main.c
index 78cc742e233f..2745e17fd021 100644
--- a/drivers/net/igb/igb_main.c
+++ b/drivers/net/igb/igb_main.c
@@ -1086,9 +1086,6 @@ static void igb_configure(struct igb_adapter *adapter)
1086 struct igb_ring *ring = adapter->rx_ring[i]; 1086 struct igb_ring *ring = adapter->rx_ring[i];
1087 igb_alloc_rx_buffers_adv(ring, igb_desc_unused(ring)); 1087 igb_alloc_rx_buffers_adv(ring, igb_desc_unused(ring));
1088 } 1088 }
1089
1090
1091 adapter->tx_queue_len = netdev->tx_queue_len;
1092} 1089}
1093 1090
1094/** 1091/**
@@ -1194,7 +1191,6 @@ void igb_down(struct igb_adapter *adapter)
1194 del_timer_sync(&adapter->watchdog_timer); 1191 del_timer_sync(&adapter->watchdog_timer);
1195 del_timer_sync(&adapter->phy_info_timer); 1192 del_timer_sync(&adapter->phy_info_timer);
1196 1193
1197 netdev->tx_queue_len = adapter->tx_queue_len;
1198 netif_carrier_off(netdev); 1194 netif_carrier_off(netdev);
1199 1195
1200 /* record the stats before reset*/ 1196 /* record the stats before reset*/
@@ -3092,17 +3088,13 @@ static void igb_watchdog_task(struct work_struct *work)
3092 ((ctrl & E1000_CTRL_RFCE) ? "RX" : 3088 ((ctrl & E1000_CTRL_RFCE) ? "RX" :
3093 ((ctrl & E1000_CTRL_TFCE) ? "TX" : "None"))); 3089 ((ctrl & E1000_CTRL_TFCE) ? "TX" : "None")));
3094 3090
3095 /* tweak tx_queue_len according to speed/duplex and 3091 /* adjust timeout factor according to speed/duplex */
3096 * adjust the timeout factor */
3097 netdev->tx_queue_len = adapter->tx_queue_len;
3098 adapter->tx_timeout_factor = 1; 3092 adapter->tx_timeout_factor = 1;
3099 switch (adapter->link_speed) { 3093 switch (adapter->link_speed) {
3100 case SPEED_10: 3094 case SPEED_10:
3101 netdev->tx_queue_len = 10;
3102 adapter->tx_timeout_factor = 14; 3095 adapter->tx_timeout_factor = 14;
3103 break; 3096 break;
3104 case SPEED_100: 3097 case SPEED_100:
3105 netdev->tx_queue_len = 100;
3106 /* maybe add some timeout factor ? */ 3098 /* maybe add some timeout factor ? */
3107 break; 3099 break;
3108 } 3100 }
@@ -3960,7 +3952,7 @@ void igb_update_stats(struct igb_adapter *adapter)
3960 struct net_device_stats *net_stats = igb_get_stats(adapter->netdev); 3952 struct net_device_stats *net_stats = igb_get_stats(adapter->netdev);
3961 struct e1000_hw *hw = &adapter->hw; 3953 struct e1000_hw *hw = &adapter->hw;
3962 struct pci_dev *pdev = adapter->pdev; 3954 struct pci_dev *pdev = adapter->pdev;
3963 u32 rnbc, reg; 3955 u32 reg, mpc;
3964 u16 phy_tmp; 3956 u16 phy_tmp;
3965 int i; 3957 int i;
3966 u64 bytes, packets; 3958 u64 bytes, packets;
@@ -4018,7 +4010,9 @@ void igb_update_stats(struct igb_adapter *adapter)
4018 adapter->stats.symerrs += rd32(E1000_SYMERRS); 4010 adapter->stats.symerrs += rd32(E1000_SYMERRS);
4019 adapter->stats.sec += rd32(E1000_SEC); 4011 adapter->stats.sec += rd32(E1000_SEC);
4020 4012
4021 adapter->stats.mpc += rd32(E1000_MPC); 4013 mpc = rd32(E1000_MPC);
4014 adapter->stats.mpc += mpc;
4015 net_stats->rx_fifo_errors += mpc;
4022 adapter->stats.scc += rd32(E1000_SCC); 4016 adapter->stats.scc += rd32(E1000_SCC);
4023 adapter->stats.ecol += rd32(E1000_ECOL); 4017 adapter->stats.ecol += rd32(E1000_ECOL);
4024 adapter->stats.mcc += rd32(E1000_MCC); 4018 adapter->stats.mcc += rd32(E1000_MCC);
@@ -4033,9 +4027,7 @@ void igb_update_stats(struct igb_adapter *adapter)
4033 adapter->stats.gptc += rd32(E1000_GPTC); 4027 adapter->stats.gptc += rd32(E1000_GPTC);
4034 adapter->stats.gotc += rd32(E1000_GOTCL); 4028 adapter->stats.gotc += rd32(E1000_GOTCL);
4035 rd32(E1000_GOTCH); /* clear GOTCL */ 4029 rd32(E1000_GOTCH); /* clear GOTCL */
4036 rnbc = rd32(E1000_RNBC); 4030 adapter->stats.rnbc += rd32(E1000_RNBC);
4037 adapter->stats.rnbc += rnbc;
4038 net_stats->rx_fifo_errors += rnbc;
4039 adapter->stats.ruc += rd32(E1000_RUC); 4031 adapter->stats.ruc += rd32(E1000_RUC);
4040 adapter->stats.rfc += rd32(E1000_RFC); 4032 adapter->stats.rfc += rd32(E1000_RFC);
4041 adapter->stats.rjc += rd32(E1000_RJC); 4033 adapter->stats.rjc += rd32(E1000_RJC);
@@ -5107,7 +5099,7 @@ static void igb_receive_skb(struct igb_q_vector *q_vector,
5107{ 5099{
5108 struct igb_adapter *adapter = q_vector->adapter; 5100 struct igb_adapter *adapter = q_vector->adapter;
5109 5101
5110 if (vlan_tag) 5102 if (vlan_tag && adapter->vlgrp)
5111 vlan_gro_receive(&q_vector->napi, adapter->vlgrp, 5103 vlan_gro_receive(&q_vector->napi, adapter->vlgrp,
5112 vlan_tag, skb); 5104 vlan_tag, skb);
5113 else 5105 else