aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2007-10-17 06:18:23 -0400
committerJeff Garzik <jeff@garzik.org>2007-10-17 20:11:28 -0400
commitc1b7151a5ef4f35fb116d1a2689c5280938b0e8d (patch)
treee960dcce949f717973c65e715ba085b5775f6036 /drivers/net
parentd85714d81cc0408daddb68c10f7fd69eafe7c213 (diff)
forcedeth: fix rx-work condition in nv_rx_process_optimized() too
The merge of my previous fix to forcedeth.c, bcb5febb248f7cc1e4a39ff61507f6343ba1c594, lost an important hunk. We need to fix nv_rx_process_optimized() too, as it contains duplicate logic. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/forcedeth.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
index cfbb7aacfe94..d0bff8a87666 100644
--- a/drivers/net/forcedeth.c
+++ b/drivers/net/forcedeth.c
@@ -2408,13 +2408,13 @@ static int nv_rx_process_optimized(struct net_device *dev, int limit)
2408 struct fe_priv *np = netdev_priv(dev); 2408 struct fe_priv *np = netdev_priv(dev);
2409 u32 flags; 2409 u32 flags;
2410 u32 vlanflags = 0; 2410 u32 vlanflags = 0;
2411 u32 rx_processed_cnt = 0; 2411 int rx_work = 0;
2412 struct sk_buff *skb; 2412 struct sk_buff *skb;
2413 int len; 2413 int len;
2414 2414
2415 while((np->get_rx.ex != np->put_rx.ex) && 2415 while((np->get_rx.ex != np->put_rx.ex) &&
2416 !((flags = le32_to_cpu(np->get_rx.ex->flaglen)) & NV_RX2_AVAIL) && 2416 !((flags = le32_to_cpu(np->get_rx.ex->flaglen)) & NV_RX2_AVAIL) &&
2417 (rx_processed_cnt++ < limit)) { 2417 (rx_work < limit)) {
2418 2418
2419 dprintk(KERN_DEBUG "%s: nv_rx_process_optimized: flags 0x%x.\n", 2419 dprintk(KERN_DEBUG "%s: nv_rx_process_optimized: flags 0x%x.\n",
2420 dev->name, flags); 2420 dev->name, flags);
@@ -2517,9 +2517,11 @@ next_pkt:
2517 np->get_rx.ex = np->first_rx.ex; 2517 np->get_rx.ex = np->first_rx.ex;
2518 if (unlikely(np->get_rx_ctx++ == np->last_rx_ctx)) 2518 if (unlikely(np->get_rx_ctx++ == np->last_rx_ctx))
2519 np->get_rx_ctx = np->first_rx_ctx; 2519 np->get_rx_ctx = np->first_rx_ctx;
2520
2521 rx_work++;
2520 } 2522 }
2521 2523
2522 return rx_processed_cnt; 2524 return rx_work;
2523} 2525}
2524 2526
2525static void set_bufsize(struct net_device *dev) 2527static void set_bufsize(struct net_device *dev)