diff options
author | Jay Cliburn <jacliburn@bellsouth.net> | 2008-09-27 00:17:21 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-08 19:07:34 -0400 |
commit | e1098328e8d201c2d3966f2fc14f14eb42120d83 (patch) | |
tree | 6dd612a335c2db14b04fd143f0244b4bdfdbb2f8 | |
parent | b29be6d3f215ac42651545e89afecc7d9e6a10db (diff) |
atl1: remove LLTX
NETIF_F_LLTX is deprecated. Remove private TX locking from the driver
and remove the NETIF_F_LLTX feature flag.
Signed-off-by: Jay Cliburn <jacliburn@bellsouth.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/atlx/atl1.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/drivers/net/atlx/atl1.c b/drivers/net/atlx/atl1.c index e00a9867390a..5f157e09e94d 100644 --- a/drivers/net/atlx/atl1.c +++ b/drivers/net/atlx/atl1.c | |||
@@ -2109,7 +2109,6 @@ static u16 atl1_tpd_avail(struct atl1_tpd_ring *tpd_ring) | |||
2109 | static int atl1_tso(struct atl1_adapter *adapter, struct sk_buff *skb, | 2109 | static int atl1_tso(struct atl1_adapter *adapter, struct sk_buff *skb, |
2110 | struct tx_packet_desc *ptpd) | 2110 | struct tx_packet_desc *ptpd) |
2111 | { | 2111 | { |
2112 | /* spinlock held */ | ||
2113 | u8 hdr_len, ip_off; | 2112 | u8 hdr_len, ip_off; |
2114 | u32 real_len; | 2113 | u32 real_len; |
2115 | int err; | 2114 | int err; |
@@ -2196,7 +2195,6 @@ static int atl1_tx_csum(struct atl1_adapter *adapter, struct sk_buff *skb, | |||
2196 | static void atl1_tx_map(struct atl1_adapter *adapter, struct sk_buff *skb, | 2195 | static void atl1_tx_map(struct atl1_adapter *adapter, struct sk_buff *skb, |
2197 | struct tx_packet_desc *ptpd) | 2196 | struct tx_packet_desc *ptpd) |
2198 | { | 2197 | { |
2199 | /* spinlock held */ | ||
2200 | struct atl1_tpd_ring *tpd_ring = &adapter->tpd_ring; | 2198 | struct atl1_tpd_ring *tpd_ring = &adapter->tpd_ring; |
2201 | struct atl1_buffer *buffer_info; | 2199 | struct atl1_buffer *buffer_info; |
2202 | u16 buf_len = skb->len; | 2200 | u16 buf_len = skb->len; |
@@ -2303,7 +2301,6 @@ static void atl1_tx_map(struct atl1_adapter *adapter, struct sk_buff *skb, | |||
2303 | static void atl1_tx_queue(struct atl1_adapter *adapter, u16 count, | 2301 | static void atl1_tx_queue(struct atl1_adapter *adapter, u16 count, |
2304 | struct tx_packet_desc *ptpd) | 2302 | struct tx_packet_desc *ptpd) |
2305 | { | 2303 | { |
2306 | /* spinlock held */ | ||
2307 | struct atl1_tpd_ring *tpd_ring = &adapter->tpd_ring; | 2304 | struct atl1_tpd_ring *tpd_ring = &adapter->tpd_ring; |
2308 | struct atl1_buffer *buffer_info; | 2305 | struct atl1_buffer *buffer_info; |
2309 | struct tx_packet_desc *tpd; | 2306 | struct tx_packet_desc *tpd; |
@@ -2361,7 +2358,6 @@ static int atl1_xmit_frame(struct sk_buff *skb, struct net_device *netdev) | |||
2361 | struct tx_packet_desc *ptpd; | 2358 | struct tx_packet_desc *ptpd; |
2362 | u16 frag_size; | 2359 | u16 frag_size; |
2363 | u16 vlan_tag; | 2360 | u16 vlan_tag; |
2364 | unsigned long flags; | ||
2365 | unsigned int nr_frags = 0; | 2361 | unsigned int nr_frags = 0; |
2366 | unsigned int mss = 0; | 2362 | unsigned int mss = 0; |
2367 | unsigned int f; | 2363 | unsigned int f; |
@@ -2399,18 +2395,9 @@ static int atl1_xmit_frame(struct sk_buff *skb, struct net_device *netdev) | |||
2399 | } | 2395 | } |
2400 | } | 2396 | } |
2401 | 2397 | ||
2402 | if (!spin_trylock_irqsave(&adapter->lock, flags)) { | ||
2403 | /* Can't get lock - tell upper layer to requeue */ | ||
2404 | if (netif_msg_tx_queued(adapter)) | ||
2405 | dev_printk(KERN_DEBUG, &adapter->pdev->dev, | ||
2406 | "tx locked\n"); | ||
2407 | return NETDEV_TX_LOCKED; | ||
2408 | } | ||
2409 | |||
2410 | if (atl1_tpd_avail(&adapter->tpd_ring) < count) { | 2398 | if (atl1_tpd_avail(&adapter->tpd_ring) < count) { |
2411 | /* not enough descriptors */ | 2399 | /* not enough descriptors */ |
2412 | netif_stop_queue(netdev); | 2400 | netif_stop_queue(netdev); |
2413 | spin_unlock_irqrestore(&adapter->lock, flags); | ||
2414 | if (netif_msg_tx_queued(adapter)) | 2401 | if (netif_msg_tx_queued(adapter)) |
2415 | dev_printk(KERN_DEBUG, &adapter->pdev->dev, | 2402 | dev_printk(KERN_DEBUG, &adapter->pdev->dev, |
2416 | "tx busy\n"); | 2403 | "tx busy\n"); |
@@ -2432,7 +2419,6 @@ static int atl1_xmit_frame(struct sk_buff *skb, struct net_device *netdev) | |||
2432 | 2419 | ||
2433 | tso = atl1_tso(adapter, skb, ptpd); | 2420 | tso = atl1_tso(adapter, skb, ptpd); |
2434 | if (tso < 0) { | 2421 | if (tso < 0) { |
2435 | spin_unlock_irqrestore(&adapter->lock, flags); | ||
2436 | dev_kfree_skb_any(skb); | 2422 | dev_kfree_skb_any(skb); |
2437 | return NETDEV_TX_OK; | 2423 | return NETDEV_TX_OK; |
2438 | } | 2424 | } |
@@ -2440,7 +2426,6 @@ static int atl1_xmit_frame(struct sk_buff *skb, struct net_device *netdev) | |||
2440 | if (!tso) { | 2426 | if (!tso) { |
2441 | ret_val = atl1_tx_csum(adapter, skb, ptpd); | 2427 | ret_val = atl1_tx_csum(adapter, skb, ptpd); |
2442 | if (ret_val < 0) { | 2428 | if (ret_val < 0) { |
2443 | spin_unlock_irqrestore(&adapter->lock, flags); | ||
2444 | dev_kfree_skb_any(skb); | 2429 | dev_kfree_skb_any(skb); |
2445 | return NETDEV_TX_OK; | 2430 | return NETDEV_TX_OK; |
2446 | } | 2431 | } |
@@ -2449,7 +2434,7 @@ static int atl1_xmit_frame(struct sk_buff *skb, struct net_device *netdev) | |||
2449 | atl1_tx_map(adapter, skb, ptpd); | 2434 | atl1_tx_map(adapter, skb, ptpd); |
2450 | atl1_tx_queue(adapter, count, ptpd); | 2435 | atl1_tx_queue(adapter, count, ptpd); |
2451 | atl1_update_mailbox(adapter); | 2436 | atl1_update_mailbox(adapter); |
2452 | spin_unlock_irqrestore(&adapter->lock, flags); | 2437 | mmiowb(); |
2453 | netdev->trans_start = jiffies; | 2438 | netdev->trans_start = jiffies; |
2454 | return NETDEV_TX_OK; | 2439 | return NETDEV_TX_OK; |
2455 | } | 2440 | } |
@@ -3024,7 +3009,6 @@ static int __devinit atl1_probe(struct pci_dev *pdev, | |||
3024 | netdev->features = NETIF_F_HW_CSUM; | 3009 | netdev->features = NETIF_F_HW_CSUM; |
3025 | netdev->features |= NETIF_F_SG; | 3010 | netdev->features |= NETIF_F_SG; |
3026 | netdev->features |= (NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX); | 3011 | netdev->features |= (NETIF_F_HW_VLAN_TX | NETIF_F_HW_VLAN_RX); |
3027 | netdev->features |= NETIF_F_LLTX; | ||
3028 | 3012 | ||
3029 | /* | 3013 | /* |
3030 | * patch for some L1 of old version, | 3014 | * patch for some L1 of old version, |