Commit c1b7151a5ef4f35fb116d1a2689c5280938b0e8d
Committed by
Jeff Garzik
1 parent
d85714d81c
Exists in
master
and in
7 other branches
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>
Showing 1 changed file with 5 additions and 3 deletions Side-by-side Diff
drivers/net/forcedeth.c
... | ... | @@ -2408,13 +2408,13 @@ |
2408 | 2408 | struct fe_priv *np = netdev_priv(dev); |
2409 | 2409 | u32 flags; |
2410 | 2410 | u32 vlanflags = 0; |
2411 | - u32 rx_processed_cnt = 0; | |
2411 | + int rx_work = 0; | |
2412 | 2412 | struct sk_buff *skb; |
2413 | 2413 | int len; |
2414 | 2414 | |
2415 | 2415 | while((np->get_rx.ex != np->put_rx.ex) && |
2416 | 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 | 2419 | dprintk(KERN_DEBUG "%s: nv_rx_process_optimized: flags 0x%x.\n", |
2420 | 2420 | dev->name, flags); |
2421 | 2421 | |
... | ... | @@ -2517,9 +2517,11 @@ |
2517 | 2517 | np->get_rx.ex = np->first_rx.ex; |
2518 | 2518 | if (unlikely(np->get_rx_ctx++ == np->last_rx_ctx)) |
2519 | 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 | |
2525 | 2527 | static void set_bufsize(struct net_device *dev) |