aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sky2.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2005-12-09 14:35:02 -0500
committerJeff Garzik <jgarzik@pobox.com>2005-12-12 15:27:21 -0500
commit0e3ff6aab1ff2d093996bd7b8c9c06c3d823855c (patch)
tree044b1b395a657643750ab79641a12889c8fdc765 /drivers/net/sky2.c
parent6cdbbdf3055f4657c9d6ccc79257bbcac1a9a1fc (diff)
[PATCH] sky2: transmit logic fixes
Some transmit side small fixes: * When computing number of list elements per transmit, do full comparision to check for checksuming. * Get rid of racy check for tx_complete * Change stop test to match wake condition. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net/sky2.c')
-rw-r--r--drivers/net/sky2.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 1eefacbfcd2e..8dfd27d4d6e5 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -1051,7 +1051,7 @@ static inline unsigned tx_le_req(const struct sk_buff *skb)
1051 if (skb_shinfo(skb)->tso_size) 1051 if (skb_shinfo(skb)->tso_size)
1052 ++count; 1052 ++count;
1053 1053
1054 if (skb->ip_summed) 1054 if (skb->ip_summed == CHECKSUM_HW)
1055 ++count; 1055 ++count;
1056 1056
1057 return count; 1057 return count;
@@ -1207,7 +1207,7 @@ static int sky2_xmit_frame(struct sk_buff *skb, struct net_device *dev)
1207 sky2_put_idx(hw, txqaddr[sky2->port], sky2->tx_prod, 1207 sky2_put_idx(hw, txqaddr[sky2->port], sky2->tx_prod,
1208 &sky2->tx_last_put, TX_RING_SIZE); 1208 &sky2->tx_last_put, TX_RING_SIZE);
1209 1209
1210 if (tx_avail(sky2) < MAX_SKB_TX_LE + 1) 1210 if (tx_avail(sky2) <= MAX_SKB_TX_LE)
1211 netif_stop_queue(dev); 1211 netif_stop_queue(dev);
1212 1212
1213out_unlock: 1213out_unlock:
@@ -1229,8 +1229,7 @@ static void sky2_tx_complete(struct sky2_port *sky2, u16 done)
1229 struct net_device *dev = sky2->netdev; 1229 struct net_device *dev = sky2->netdev;
1230 unsigned i; 1230 unsigned i;
1231 1231
1232 if (done == sky2->tx_cons) 1232 BUG_ON(done >= TX_RING_SIZE);
1233 return;
1234 1233
1235 if (unlikely(netif_msg_tx_done(sky2))) 1234 if (unlikely(netif_msg_tx_done(sky2)))
1236 printk(KERN_DEBUG "%s: tx done, up to %u\n", 1235 printk(KERN_DEBUG "%s: tx done, up to %u\n",