Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 88026
b: refs/heads/master
c: bd6ca63
h: refs/heads/master
v: v3
  • Loading branch information
Ingo Molnar authored and Jeff Garzik committed Mar 29, 2008
1 parent 5f01b06 commit 85d9d83
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c6cbcad1ec0dbb08b640d1ca166a42dcb4fb8faa
refs/heads/master: bd6ca6375b9f18f40e814f391d9d1abaa916bc72
18 changes: 10 additions & 8 deletions trunk/drivers/net/forcedeth.c
Original file line number Diff line number Diff line change
Expand Up @@ -1854,6 +1854,7 @@ static int nv_start_xmit(struct sk_buff *skb, struct net_device *dev)
struct ring_desc* start_tx;
struct ring_desc* prev_tx;
struct nv_skb_map* prev_tx_ctx;
unsigned long flags;

/* add fragments to entries count */
for (i = 0; i < fragments; i++) {
Expand All @@ -1863,10 +1864,10 @@ static int nv_start_xmit(struct sk_buff *skb, struct net_device *dev)

empty_slots = nv_get_empty_tx_slots(np);
if (unlikely(empty_slots <= entries)) {
spin_lock_irq(&np->lock);
spin_lock_irqsave(&np->lock, flags);
netif_stop_queue(dev);
np->tx_stop = 1;
spin_unlock_irq(&np->lock);
spin_unlock_irqrestore(&np->lock, flags);
return NETDEV_TX_BUSY;
}

Expand Down Expand Up @@ -1929,13 +1930,13 @@ static int nv_start_xmit(struct sk_buff *skb, struct net_device *dev)
tx_flags_extra = skb->ip_summed == CHECKSUM_PARTIAL ?
NV_TX2_CHECKSUM_L3 | NV_TX2_CHECKSUM_L4 : 0;

spin_lock_irq(&np->lock);
spin_lock_irqsave(&np->lock, flags);

/* set tx flags */
start_tx->flaglen |= cpu_to_le32(tx_flags | tx_flags_extra);
np->put_tx.orig = put_tx;

spin_unlock_irq(&np->lock);
spin_unlock_irqrestore(&np->lock, flags);

dprintk(KERN_DEBUG "%s: nv_start_xmit: entries %d queued for transmission. tx_flags_extra: %x\n",
dev->name, entries, tx_flags_extra);
Expand Down Expand Up @@ -1971,6 +1972,7 @@ static int nv_start_xmit_optimized(struct sk_buff *skb, struct net_device *dev)
struct ring_desc_ex* prev_tx;
struct nv_skb_map* prev_tx_ctx;
struct nv_skb_map* start_tx_ctx;
unsigned long flags;

/* add fragments to entries count */
for (i = 0; i < fragments; i++) {
Expand All @@ -1980,10 +1982,10 @@ static int nv_start_xmit_optimized(struct sk_buff *skb, struct net_device *dev)

empty_slots = nv_get_empty_tx_slots(np);
if (unlikely(empty_slots <= entries)) {
spin_lock_irq(&np->lock);
spin_lock_irqsave(&np->lock, flags);
netif_stop_queue(dev);
np->tx_stop = 1;
spin_unlock_irq(&np->lock);
spin_unlock_irqrestore(&np->lock, flags);
return NETDEV_TX_BUSY;
}

Expand Down Expand Up @@ -2059,7 +2061,7 @@ static int nv_start_xmit_optimized(struct sk_buff *skb, struct net_device *dev)
start_tx->txvlan = 0;
}

spin_lock_irq(&np->lock);
spin_lock_irqsave(&np->lock, flags);

if (np->tx_limit) {
/* Limit the number of outstanding tx. Setup all fragments, but
Expand All @@ -2085,7 +2087,7 @@ static int nv_start_xmit_optimized(struct sk_buff *skb, struct net_device *dev)
start_tx->flaglen |= cpu_to_le32(tx_flags | tx_flags_extra);
np->put_tx.ex = put_tx;

spin_unlock_irq(&np->lock);
spin_unlock_irqrestore(&np->lock, flags);

dprintk(KERN_DEBUG "%s: nv_start_xmit_optimized: entries %d queued for transmission. tx_flags_extra: %x\n",
dev->name, entries, tx_flags_extra);
Expand Down

0 comments on commit 85d9d83

Please sign in to comment.