diff options
author | David S. Miller <davem@davemloft.net> | 2010-04-07 02:53:30 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-04-07 02:53:30 -0400 |
commit | 4a35ecf8bf1c4b039503fa554100fe85c761de76 (patch) | |
tree | 9b75f5d5636004d9a9aa496924377379be09aa1f /drivers/net/igb | |
parent | b4d562e3c3553ac58c7120555c4e4aefbb090a2a (diff) | |
parent | fb9e2d887243499b8d28efcf80821c4f6a092395 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Conflicts:
drivers/net/bonding/bond_main.c
drivers/net/via-velocity.c
drivers/net/wireless/iwlwifi/iwl-agn.c
Diffstat (limited to 'drivers/net/igb')
-rw-r--r-- | drivers/net/igb/e1000_mac.c | 6 | ||||
-rw-r--r-- | drivers/net/igb/igb.h | 1 | ||||
-rw-r--r-- | drivers/net/igb/igb_main.c | 22 |
3 files changed, 10 insertions, 19 deletions
diff --git a/drivers/net/igb/e1000_mac.c b/drivers/net/igb/e1000_mac.c index 2a8a886b37eb..be8d010e4021 100644 --- a/drivers/net/igb/e1000_mac.c +++ b/drivers/net/igb/e1000_mac.c | |||
@@ -1367,7 +1367,8 @@ out: | |||
1367 | * igb_enable_mng_pass_thru - Enable processing of ARP's | 1367 | * igb_enable_mng_pass_thru - Enable processing of ARP's |
1368 | * @hw: pointer to the HW structure | 1368 | * @hw: pointer to the HW structure |
1369 | * | 1369 | * |
1370 | * Verifies the hardware needs to allow ARPs to be processed by the host. | 1370 | * Verifies the hardware needs to leave interface enabled so that frames can |
1371 | * be directed to and from the management interface. | ||
1371 | **/ | 1372 | **/ |
1372 | bool igb_enable_mng_pass_thru(struct e1000_hw *hw) | 1373 | bool igb_enable_mng_pass_thru(struct e1000_hw *hw) |
1373 | { | 1374 | { |
@@ -1380,8 +1381,7 @@ bool igb_enable_mng_pass_thru(struct e1000_hw *hw) | |||
1380 | 1381 | ||
1381 | manc = rd32(E1000_MANC); | 1382 | manc = rd32(E1000_MANC); |
1382 | 1383 | ||
1383 | if (!(manc & E1000_MANC_RCV_TCO_EN) || | 1384 | if (!(manc & E1000_MANC_RCV_TCO_EN)) |
1384 | !(manc & E1000_MANC_EN_MAC_ADDR_FILTER)) | ||
1385 | goto out; | 1385 | goto out; |
1386 | 1386 | ||
1387 | if (hw->mac.arc_subsystem_valid) { | 1387 | if (hw->mac.arc_subsystem_valid) { |
diff --git a/drivers/net/igb/igb.h b/drivers/net/igb/igb.h index 4f69b6d951b3..7d288ccca1ca 100644 --- a/drivers/net/igb/igb.h +++ b/drivers/net/igb/igb.h | |||
@@ -268,7 +268,6 @@ struct igb_adapter { | |||
268 | 268 | ||
269 | /* TX */ | 269 | /* TX */ |
270 | struct igb_ring *tx_ring[16]; | 270 | struct igb_ring *tx_ring[16]; |
271 | unsigned long tx_queue_len; | ||
272 | u32 tx_timeout_count; | 271 | u32 tx_timeout_count; |
273 | 272 | ||
274 | /* RX */ | 273 | /* RX */ |
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 |