diff options
Diffstat (limited to 'drivers/net/sungem.c')
-rw-r--r-- | 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 f6fedcc32de1..68872142530b 100644 --- a/drivers/net/sungem.c +++ b/drivers/net/sungem.c | |||
@@ -2281,14 +2281,12 @@ static void gem_reset_task(struct work_struct *work) | |||
2281 | 2281 | ||
2282 | mutex_lock(&gp->pm_mutex); | 2282 | mutex_lock(&gp->pm_mutex); |
2283 | 2283 | ||
2284 | napi_disable(&gp->napi); | 2284 | if (gp->opened) |
2285 | napi_disable(&gp->napi); | ||
2285 | 2286 | ||
2286 | spin_lock_irq(&gp->lock); | 2287 | spin_lock_irq(&gp->lock); |
2287 | spin_lock(&gp->tx_lock); | 2288 | spin_lock(&gp->tx_lock); |
2288 | 2289 | ||
2289 | if (gp->running == 0) | ||
2290 | goto not_running; | ||
2291 | |||
2292 | if (gp->running) { | 2290 | if (gp->running) { |
2293 | netif_stop_queue(gp->dev); | 2291 | netif_stop_queue(gp->dev); |
2294 | 2292 | ||
@@ -2298,13 +2296,14 @@ static void gem_reset_task(struct work_struct *work) | |||
2298 | gem_set_link_modes(gp); | 2296 | gem_set_link_modes(gp); |
2299 | netif_wake_queue(gp->dev); | 2297 | netif_wake_queue(gp->dev); |
2300 | } | 2298 | } |
2301 | not_running: | 2299 | |
2302 | gp->reset_task_pending = 0; | 2300 | gp->reset_task_pending = 0; |
2303 | 2301 | ||
2304 | spin_unlock(&gp->tx_lock); | 2302 | spin_unlock(&gp->tx_lock); |
2305 | spin_unlock_irq(&gp->lock); | 2303 | spin_unlock_irq(&gp->lock); |
2306 | 2304 | ||
2307 | napi_enable(&gp->napi); | 2305 | if (gp->opened) |
2306 | napi_enable(&gp->napi); | ||
2308 | 2307 | ||
2309 | mutex_unlock(&gp->pm_mutex); | 2308 | mutex_unlock(&gp->pm_mutex); |
2310 | } | 2309 | } |