aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/e1000
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/e1000')
-rw-r--r--drivers/net/e1000/e1000.h2
-rw-r--r--drivers/net/e1000/e1000_main.c29
2 files changed, 3 insertions, 28 deletions
diff --git a/drivers/net/e1000/e1000.h b/drivers/net/e1000/e1000.h
index f5581de04757..e9a416f40162 100644
--- a/drivers/net/e1000/e1000.h
+++ b/drivers/net/e1000/e1000.h
@@ -182,7 +182,6 @@ struct e1000_tx_ring {
182 /* array of buffer information structs */ 182 /* array of buffer information structs */
183 struct e1000_buffer *buffer_info; 183 struct e1000_buffer *buffer_info;
184 184
185 spinlock_t tx_lock;
186 u16 tdh; 185 u16 tdh;
187 u16 tdt; 186 u16 tdt;
188 bool last_tx_tso; 187 bool last_tx_tso;
@@ -238,7 +237,6 @@ struct e1000_adapter {
238 u16 link_speed; 237 u16 link_speed;
239 u16 link_duplex; 238 u16 link_duplex;
240 spinlock_t stats_lock; 239 spinlock_t stats_lock;
241 spinlock_t tx_queue_lock;
242 unsigned int total_tx_bytes; 240 unsigned int total_tx_bytes;
243 unsigned int total_tx_packets; 241 unsigned int total_tx_packets;
244 unsigned int total_rx_bytes; 242 unsigned int total_rx_bytes;
diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index ffe466e0afb9..7ec1a0c5a0cf 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -31,7 +31,7 @@
31 31
32char e1000_driver_name[] = "e1000"; 32char e1000_driver_name[] = "e1000";
33static char e1000_driver_string[] = "Intel(R) PRO/1000 Network Driver"; 33static char e1000_driver_string[] = "Intel(R) PRO/1000 Network Driver";
34#define DRV_VERSION "7.3.20-k3-NAPI" 34#define DRV_VERSION "7.3.21-k2-NAPI"
35const char e1000_driver_version[] = DRV_VERSION; 35const char e1000_driver_version[] = DRV_VERSION;
36static const char e1000_copyright[] = "Copyright (c) 1999-2006 Intel Corporation."; 36static const char e1000_copyright[] = "Copyright (c) 1999-2006 Intel Corporation.";
37 37
@@ -1048,8 +1048,6 @@ static int __devinit e1000_probe(struct pci_dev *pdev,
1048 if (pci_using_dac) 1048 if (pci_using_dac)
1049 netdev->features |= NETIF_F_HIGHDMA; 1049 netdev->features |= NETIF_F_HIGHDMA;
1050 1050
1051 netdev->features |= NETIF_F_LLTX;
1052
1053 netdev->vlan_features |= NETIF_F_TSO; 1051 netdev->vlan_features |= NETIF_F_TSO;
1054 netdev->vlan_features |= NETIF_F_TSO6; 1052 netdev->vlan_features |= NETIF_F_TSO6;
1055 netdev->vlan_features |= NETIF_F_HW_CSUM; 1053 netdev->vlan_features |= NETIF_F_HW_CSUM;
@@ -1368,8 +1366,6 @@ static int __devinit e1000_sw_init(struct e1000_adapter *adapter)
1368 return -ENOMEM; 1366 return -ENOMEM;
1369 } 1367 }
1370 1368
1371 spin_lock_init(&adapter->tx_queue_lock);
1372
1373 /* Explicitly disable IRQ since the NIC can be in any state. */ 1369 /* Explicitly disable IRQ since the NIC can be in any state. */
1374 e1000_irq_disable(adapter); 1370 e1000_irq_disable(adapter);
1375 1371
@@ -1624,7 +1620,6 @@ setup_tx_desc_die:
1624 1620
1625 txdr->next_to_use = 0; 1621 txdr->next_to_use = 0;
1626 txdr->next_to_clean = 0; 1622 txdr->next_to_clean = 0;
1627 spin_lock_init(&txdr->tx_lock);
1628 1623
1629 return 0; 1624 return 0;
1630} 1625}
@@ -3185,7 +3180,6 @@ static int e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
3185 unsigned int max_txd_pwr = E1000_MAX_TXD_PWR; 3180 unsigned int max_txd_pwr = E1000_MAX_TXD_PWR;
3186 unsigned int tx_flags = 0; 3181 unsigned int tx_flags = 0;
3187 unsigned int len = skb->len - skb->data_len; 3182 unsigned int len = skb->len - skb->data_len;
3188 unsigned long flags;
3189 unsigned int nr_frags; 3183 unsigned int nr_frags;
3190 unsigned int mss; 3184 unsigned int mss;
3191 int count = 0; 3185 int count = 0;
@@ -3290,22 +3284,15 @@ static int e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
3290 (hw->mac_type == e1000_82573)) 3284 (hw->mac_type == e1000_82573))
3291 e1000_transfer_dhcp_info(adapter, skb); 3285 e1000_transfer_dhcp_info(adapter, skb);
3292 3286
3293 if (!spin_trylock_irqsave(&tx_ring->tx_lock, flags))
3294 /* Collision - tell upper layer to requeue */
3295 return NETDEV_TX_LOCKED;
3296
3297 /* need: count + 2 desc gap to keep tail from touching 3287 /* need: count + 2 desc gap to keep tail from touching
3298 * head, otherwise try next time */ 3288 * head, otherwise try next time */
3299 if (unlikely(e1000_maybe_stop_tx(netdev, tx_ring, count + 2))) { 3289 if (unlikely(e1000_maybe_stop_tx(netdev, tx_ring, count + 2)))
3300 spin_unlock_irqrestore(&tx_ring->tx_lock, flags);
3301 return NETDEV_TX_BUSY; 3290 return NETDEV_TX_BUSY;
3302 }
3303 3291
3304 if (unlikely(hw->mac_type == e1000_82547)) { 3292 if (unlikely(hw->mac_type == e1000_82547)) {
3305 if (unlikely(e1000_82547_fifo_workaround(adapter, skb))) { 3293 if (unlikely(e1000_82547_fifo_workaround(adapter, skb))) {
3306 netif_stop_queue(netdev); 3294 netif_stop_queue(netdev);
3307 mod_timer(&adapter->tx_fifo_stall_timer, jiffies + 1); 3295 mod_timer(&adapter->tx_fifo_stall_timer, jiffies + 1);
3308 spin_unlock_irqrestore(&tx_ring->tx_lock, flags);
3309 return NETDEV_TX_BUSY; 3296 return NETDEV_TX_BUSY;
3310 } 3297 }
3311 } 3298 }
@@ -3320,7 +3307,6 @@ static int e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
3320 tso = e1000_tso(adapter, tx_ring, skb); 3307 tso = e1000_tso(adapter, tx_ring, skb);
3321 if (tso < 0) { 3308 if (tso < 0) {
3322 dev_kfree_skb_any(skb); 3309 dev_kfree_skb_any(skb);
3323 spin_unlock_irqrestore(&tx_ring->tx_lock, flags);
3324 return NETDEV_TX_OK; 3310 return NETDEV_TX_OK;
3325 } 3311 }
3326 3312
@@ -3345,7 +3331,6 @@ static int e1000_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
3345 /* Make sure there is space in the ring for the next send. */ 3331 /* Make sure there is space in the ring for the next send. */
3346 e1000_maybe_stop_tx(netdev, tx_ring, MAX_SKB_FRAGS + 2); 3332 e1000_maybe_stop_tx(netdev, tx_ring, MAX_SKB_FRAGS + 2);
3347 3333
3348 spin_unlock_irqrestore(&tx_ring->tx_lock, flags);
3349 return NETDEV_TX_OK; 3334 return NETDEV_TX_OK;
3350} 3335}
3351 3336
@@ -3773,15 +3758,7 @@ static int e1000_clean(struct napi_struct *napi, int budget)
3773 3758
3774 adapter = netdev_priv(poll_dev); 3759 adapter = netdev_priv(poll_dev);
3775 3760
3776 /* e1000_clean is called per-cpu. This lock protects 3761 tx_cleaned = e1000_clean_tx_irq(adapter, &adapter->tx_ring[0]);
3777 * tx_ring[0] from being cleaned by multiple cpus
3778 * simultaneously. A failure obtaining the lock means
3779 * tx_ring[0] is currently being cleaned anyway. */
3780 if (spin_trylock(&adapter->tx_queue_lock)) {
3781 tx_cleaned = e1000_clean_tx_irq(adapter,
3782 &adapter->tx_ring[0]);
3783 spin_unlock(&adapter->tx_queue_lock);
3784 }
3785 3762
3786 adapter->clean_rx(adapter, &adapter->rx_ring[0], 3763 adapter->clean_rx(adapter, &adapter->rx_ring[0],
3787 &work_done, budget); 3764 &work_done, budget);