aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/atlx/atl2.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/atlx/atl2.c')
-rw-r--r--drivers/net/atlx/atl2.c24
1 files changed, 1 insertions, 23 deletions
diff --git a/drivers/net/atlx/atl2.c b/drivers/net/atlx/atl2.c
index 4f82f6661535..f5bdc92c1a65 100644
--- a/drivers/net/atlx/atl2.c
+++ b/drivers/net/atlx/atl2.c
@@ -116,7 +116,6 @@ static int __devinit atl2_sw_init(struct atl2_adapter *adapter)
116 hw->max_frame_size = adapter->netdev->mtu; 116 hw->max_frame_size = adapter->netdev->mtu;
117 117
118 spin_lock_init(&adapter->stats_lock); 118 spin_lock_init(&adapter->stats_lock);
119 spin_lock_init(&adapter->tx_lock);
120 119
121 set_bit(__ATL2_DOWN, &adapter->flags); 120 set_bit(__ATL2_DOWN, &adapter->flags);
122 121
@@ -751,11 +750,7 @@ static void atl2_down(struct atl2_adapter *adapter)
751 * reschedule our watchdog timer */ 750 * reschedule our watchdog timer */
752 set_bit(__ATL2_DOWN, &adapter->flags); 751 set_bit(__ATL2_DOWN, &adapter->flags);
753 752
754#ifdef NETIF_F_LLTX
755 netif_stop_queue(netdev);
756#else
757 netif_tx_disable(netdev); 753 netif_tx_disable(netdev);
758#endif
759 754
760 /* reset MAC to disable all RX/TX */ 755 /* reset MAC to disable all RX/TX */
761 atl2_reset_hw(&adapter->hw); 756 atl2_reset_hw(&adapter->hw);
@@ -831,7 +826,6 @@ static inline int TxdFreeBytes(struct atl2_adapter *adapter)
831static int atl2_xmit_frame(struct sk_buff *skb, struct net_device *netdev) 826static int atl2_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
832{ 827{
833 struct atl2_adapter *adapter = netdev_priv(netdev); 828 struct atl2_adapter *adapter = netdev_priv(netdev);
834 unsigned long flags;
835 struct tx_pkt_header *txph; 829 struct tx_pkt_header *txph;
836 u32 offset, copy_len; 830 u32 offset, copy_len;
837 int txs_unused; 831 int txs_unused;
@@ -847,16 +841,6 @@ static int atl2_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
847 return NETDEV_TX_OK; 841 return NETDEV_TX_OK;
848 } 842 }
849 843
850#ifdef NETIF_F_LLTX
851 local_irq_save(flags);
852 if (!spin_trylock(&adapter->tx_lock)) {
853 /* Collision - tell upper layer to requeue */
854 local_irq_restore(flags);
855 return NETDEV_TX_LOCKED;
856 }
857#else
858 spin_lock_irqsave(&adapter->tx_lock, flags);
859#endif
860 txs_unused = TxsFreeUnit(adapter); 844 txs_unused = TxsFreeUnit(adapter);
861 txbuf_unused = TxdFreeBytes(adapter); 845 txbuf_unused = TxdFreeBytes(adapter);
862 846
@@ -864,7 +848,6 @@ static int atl2_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
864 txs_unused < 1) { 848 txs_unused < 1) {
865 /* not enough resources */ 849 /* not enough resources */
866 netif_stop_queue(netdev); 850 netif_stop_queue(netdev);
867 spin_unlock_irqrestore(&adapter->tx_lock, flags);
868 return NETDEV_TX_BUSY; 851 return NETDEV_TX_BUSY;
869 } 852 }
870 853
@@ -910,8 +893,7 @@ static int atl2_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
910 ATL2_WRITE_REGW(&adapter->hw, REG_MB_TXD_WR_IDX, 893 ATL2_WRITE_REGW(&adapter->hw, REG_MB_TXD_WR_IDX,
911 (adapter->txd_write_ptr >> 2)); 894 (adapter->txd_write_ptr >> 2));
912 895
913 spin_unlock_irqrestore(&adapter->tx_lock, flags); 896 mmiowb();
914
915 netdev->trans_start = jiffies; 897 netdev->trans_start = jiffies;
916 dev_kfree_skb_any(skb); 898 dev_kfree_skb_any(skb);
917 return NETDEV_TX_OK; 899 return NETDEV_TX_OK;
@@ -1449,10 +1431,6 @@ static int __devinit atl2_probe(struct pci_dev *pdev,
1449 netdev->features |= (NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX); 1431 netdev->features |= (NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX);
1450#endif 1432#endif
1451 1433
1452#ifdef NETIF_F_LLTX
1453 netdev->features |= NETIF_F_LLTX;
1454#endif
1455
1456 /* Init PHY as early as possible due to power saving issue */ 1434 /* Init PHY as early as possible due to power saving issue */
1457 atl2_phy_init(&adapter->hw); 1435 atl2_phy_init(&adapter->hw);
1458 1436