Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 194614
b: refs/heads/master
c: 81a2e36
h: refs/heads/master
v: v3
  • Loading branch information
stephen hemminger authored and David S. Miller committed Apr 30, 2010
1 parent ea1c6db commit c59c573
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 15 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: f84af32cbca70a3c6d30463dc08c7984af11c277
refs/heads/master: 81a2e36df7de8bf9417de67f9d54b4f740072ed0
31 changes: 17 additions & 14 deletions trunk/drivers/net/forcedeth.c
Original file line number Diff line number Diff line change
Expand Up @@ -3743,23 +3743,26 @@ static int nv_napi_poll(struct napi_struct *napi, int budget)
u8 __iomem *base = get_hwbase(dev);
unsigned long flags;
int retcode;
int tx_work, rx_work;
int rx_count, tx_work=0, rx_work=0;

if (!nv_optimized(np)) {
spin_lock_irqsave(&np->lock, flags);
tx_work = nv_tx_done(dev, np->tx_ring_size);
spin_unlock_irqrestore(&np->lock, flags);
do {
if (!nv_optimized(np)) {
spin_lock_irqsave(&np->lock, flags);
tx_work += nv_tx_done(dev, np->tx_ring_size);
spin_unlock_irqrestore(&np->lock, flags);

rx_work = nv_rx_process(dev, budget);
retcode = nv_alloc_rx(dev);
} else {
spin_lock_irqsave(&np->lock, flags);
tx_work = nv_tx_done_optimized(dev, np->tx_ring_size);
spin_unlock_irqrestore(&np->lock, flags);
rx_count = nv_rx_process(dev, budget);
retcode = nv_alloc_rx(dev);
} else {
spin_lock_irqsave(&np->lock, flags);
tx_work += nv_tx_done_optimized(dev, np->tx_ring_size);
spin_unlock_irqrestore(&np->lock, flags);

rx_work = nv_rx_process_optimized(dev, budget);
retcode = nv_alloc_rx_optimized(dev);
}
rx_count = nv_rx_process_optimized(dev, budget);
retcode = nv_alloc_rx_optimized(dev);
}
} while (retcode == 0 &&
rx_count > 0 && (rx_work += rx_count) < budget);

if (retcode) {
spin_lock_irqsave(&np->lock, flags);
Expand Down

0 comments on commit c59c573

Please sign in to comment.