Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=dde655c9df02ee07ed090dfdb7ae8741bf299e14
Commit:     dde655c9df02ee07ed090dfdb7ae8741bf299e14
Parent:     5dba4797115c8fa05c1a4d12927a6ae0b33ffc41
Author:     Johannes Berg <[EMAIL PROTECTED]>
AuthorDate: Thu Nov 29 21:51:36 2007 +1100
Committer:  Herbert Xu <[EMAIL PROTECTED]>
CommitDate: Thu Nov 29 21:51:36 2007 +1100

    [SUNGEM]: Fix NAPI regression with reset work
    
    sungem's gem_reset_task() will unconditionally try to disable NAPI even
    when it's called while the interface is not operating and hence the NAPI
    struct isn't enabled. Make napi_disable() depend on gp->running.
    
    Also removes a superfluous test of gp->running in the same function.
    
    Signed-off-by: Johannes Berg <[EMAIL PROTECTED]>
    Signed-off-by: Herbert Xu <[EMAIL PROTECTED]>
---
 drivers/net/sungem.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/net/sungem.c b/drivers/net/sungem.c
index f6fedcc..6887214 100644
--- a/drivers/net/sungem.c
+++ b/drivers/net/sungem.c
@@ -2281,14 +2281,12 @@ static void gem_reset_task(struct work_struct *work)
 
        mutex_lock(&gp->pm_mutex);
 
-       napi_disable(&gp->napi);
+       if (gp->opened)
+               napi_disable(&gp->napi);
 
        spin_lock_irq(&gp->lock);
        spin_lock(&gp->tx_lock);
 
-       if (gp->running == 0)
-               goto not_running;
-
        if (gp->running) {
                netif_stop_queue(gp->dev);
 
@@ -2298,13 +2296,14 @@ static void gem_reset_task(struct work_struct *work)
                        gem_set_link_modes(gp);
                netif_wake_queue(gp->dev);
        }
- not_running:
+
        gp->reset_task_pending = 0;
 
        spin_unlock(&gp->tx_lock);
        spin_unlock_irq(&gp->lock);
 
-       napi_enable(&gp->napi);
+       if (gp->opened)
+               napi_enable(&gp->napi);
 
        mutex_unlock(&gp->pm_mutex);
 }
-
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