aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgb/ixgb_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ixgb/ixgb_main.c')
-rw-r--r--drivers/net/ixgb/ixgb_main.c32
1 files changed, 1 insertions, 31 deletions
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
index 79082eb577c6..bd08e1992140 100644
--- a/drivers/net/ixgb/ixgb_main.c
+++ b/drivers/net/ixgb/ixgb_main.c
@@ -448,9 +448,6 @@ ixgb_probe(struct pci_dev *pdev,
448 NETIF_F_HW_VLAN_RX | 448 NETIF_F_HW_VLAN_RX |
449 NETIF_F_HW_VLAN_FILTER; 449 NETIF_F_HW_VLAN_FILTER;
450 netdev->features |= NETIF_F_TSO; 450 netdev->features |= NETIF_F_TSO;
451#ifdef NETIF_F_LLTX
452 netdev->features |= NETIF_F_LLTX;
453#endif
454 451
455 if(pci_using_dac) 452 if(pci_using_dac)
456 netdev->features |= NETIF_F_HIGHDMA; 453 netdev->features |= NETIF_F_HIGHDMA;
@@ -577,8 +574,6 @@ ixgb_sw_init(struct ixgb_adapter *adapter)
577 /* enable flow control to be programmed */ 574 /* enable flow control to be programmed */
578 hw->fc.send_xon = 1; 575 hw->fc.send_xon = 1;
579 576
580 spin_lock_init(&adapter->tx_lock);
581
582 set_bit(__IXGB_DOWN, &adapter->flags); 577 set_bit(__IXGB_DOWN, &adapter->flags);
583 return 0; 578 return 0;
584} 579}
@@ -1441,7 +1436,6 @@ ixgb_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
1441 struct ixgb_adapter *adapter = netdev_priv(netdev); 1436 struct ixgb_adapter *adapter = netdev_priv(netdev);
1442 unsigned int first; 1437 unsigned int first;
1443 unsigned int tx_flags = 0; 1438 unsigned int tx_flags = 0;
1444 unsigned long flags;
1445 int vlan_id = 0; 1439 int vlan_id = 0;
1446 int tso; 1440 int tso;
1447 1441
@@ -1455,26 +1449,9 @@ ixgb_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
1455 return 0; 1449 return 0;
1456 } 1450 }
1457 1451
1458#ifdef NETIF_F_LLTX
1459 if (!spin_trylock_irqsave(&adapter->tx_lock, flags)) {
1460 /* Collision - tell upper layer to requeue */
1461 local_irq_restore(flags);
1462 return NETDEV_TX_LOCKED;
1463 }
1464#else
1465 spin_lock_irqsave(&adapter->tx_lock, flags);
1466#endif
1467
1468 if (unlikely(ixgb_maybe_stop_tx(netdev, &adapter->tx_ring, 1452 if (unlikely(ixgb_maybe_stop_tx(netdev, &adapter->tx_ring,
1469 DESC_NEEDED))) { 1453 DESC_NEEDED)))
1470 netif_stop_queue(netdev);
1471 spin_unlock_irqrestore(&adapter->tx_lock, flags);
1472 return NETDEV_TX_BUSY; 1454 return NETDEV_TX_BUSY;
1473 }
1474
1475#ifndef NETIF_F_LLTX
1476 spin_unlock_irqrestore(&adapter->tx_lock, flags);
1477#endif
1478 1455
1479 if(adapter->vlgrp && vlan_tx_tag_present(skb)) { 1456 if(adapter->vlgrp && vlan_tx_tag_present(skb)) {
1480 tx_flags |= IXGB_TX_FLAGS_VLAN; 1457 tx_flags |= IXGB_TX_FLAGS_VLAN;
@@ -1486,9 +1463,6 @@ ixgb_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
1486 tso = ixgb_tso(adapter, skb); 1463 tso = ixgb_tso(adapter, skb);
1487 if (tso < 0) { 1464 if (tso < 0) {
1488 dev_kfree_skb_any(skb); 1465 dev_kfree_skb_any(skb);
1489#ifdef NETIF_F_LLTX
1490 spin_unlock_irqrestore(&adapter->tx_lock, flags);
1491#endif
1492 return NETDEV_TX_OK; 1466 return NETDEV_TX_OK;
1493 } 1467 }
1494 1468
@@ -1502,13 +1476,9 @@ ixgb_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
1502 1476
1503 netdev->trans_start = jiffies; 1477 netdev->trans_start = jiffies;
1504 1478
1505#ifdef NETIF_F_LLTX
1506 /* Make sure there is space in the ring for the next send. */ 1479 /* Make sure there is space in the ring for the next send. */
1507 ixgb_maybe_stop_tx(netdev, &adapter->tx_ring, DESC_NEEDED); 1480 ixgb_maybe_stop_tx(netdev, &adapter->tx_ring, DESC_NEEDED);
1508 1481
1509 spin_unlock_irqrestore(&adapter->tx_lock, flags);
1510
1511#endif
1512 return NETDEV_TX_OK; 1482 return NETDEV_TX_OK;
1513} 1483}
1514 1484