Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c1b7151a5ef4f35fb116d1a2689c5280938b0e8d
Commit:     c1b7151a5ef4f35fb116d1a2689c5280938b0e8d
Parent:     d85714d81cc0408daddb68c10f7fd69eafe7c213
Author:     Ingo Molnar <[EMAIL PROTECTED]>
AuthorDate: Wed Oct 17 12:18:23 2007 +0200
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Wed Oct 17 20:11:28 2007 -0400

    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 <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/net/forcedeth.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c
index cfbb7aa..d0bff8a 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)
        struct fe_priv *np = netdev_priv(dev);
        u32 flags;
        u32 vlanflags = 0;
-       u32 rx_processed_cnt = 0;
+       int rx_work = 0;
        struct sk_buff *skb;
        int len;
 
        while((np->get_rx.ex != np->put_rx.ex) &&
              !((flags = le32_to_cpu(np->get_rx.ex->flaglen)) & NV_RX2_AVAIL) &&
-             (rx_processed_cnt++ < limit)) {
+             (rx_work < limit)) {
 
                dprintk(KERN_DEBUG "%s: nv_rx_process_optimized: flags 0x%x.\n",
                                        dev->name, flags);
@@ -2517,9 +2517,11 @@ next_pkt:
                        np->get_rx.ex = np->first_rx.ex;
                if (unlikely(np->get_rx_ctx++ == np->last_rx_ctx))
                        np->get_rx_ctx = np->first_rx_ctx;
+
+               rx_work++;
        }
 
-       return rx_processed_cnt;
+       return rx_work;
 }
 
 static void set_bufsize(struct net_device *dev)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to