diff options
-rw-r--r-- | drivers/net/amd8111e.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/net/amd8111e.c b/drivers/net/amd8111e.c index eebf5bb2b03a..e7fdd81919bd 100644 --- a/drivers/net/amd8111e.c +++ b/drivers/net/amd8111e.c | |||
@@ -1340,7 +1340,9 @@ static int amd8111e_close(struct net_device * dev) | |||
1340 | struct amd8111e_priv *lp = netdev_priv(dev); | 1340 | struct amd8111e_priv *lp = netdev_priv(dev); |
1341 | netif_stop_queue(dev); | 1341 | netif_stop_queue(dev); |
1342 | 1342 | ||
1343 | #ifdef CONFIG_AMD8111E_NAPI | ||
1343 | napi_disable(&lp->napi); | 1344 | napi_disable(&lp->napi); |
1345 | #endif | ||
1344 | 1346 | ||
1345 | spin_lock_irq(&lp->lock); | 1347 | spin_lock_irq(&lp->lock); |
1346 | 1348 | ||
@@ -1372,7 +1374,9 @@ static int amd8111e_open(struct net_device * dev ) | |||
1372 | dev->name, dev)) | 1374 | dev->name, dev)) |
1373 | return -EAGAIN; | 1375 | return -EAGAIN; |
1374 | 1376 | ||
1377 | #ifdef CONFIG_AMD8111E_NAPI | ||
1375 | napi_enable(&lp->napi); | 1378 | napi_enable(&lp->napi); |
1379 | #endif | ||
1376 | 1380 | ||
1377 | spin_lock_irq(&lp->lock); | 1381 | spin_lock_irq(&lp->lock); |
1378 | 1382 | ||
@@ -1380,7 +1384,9 @@ static int amd8111e_open(struct net_device * dev ) | |||
1380 | 1384 | ||
1381 | if(amd8111e_restart(dev)){ | 1385 | if(amd8111e_restart(dev)){ |
1382 | spin_unlock_irq(&lp->lock); | 1386 | spin_unlock_irq(&lp->lock); |
1387 | #ifdef CONFIG_AMD8111E_NAPI | ||
1383 | napi_disable(&lp->napi); | 1388 | napi_disable(&lp->napi); |
1389 | #endif | ||
1384 | if (dev->irq) | 1390 | if (dev->irq) |
1385 | free_irq(dev->irq, dev); | 1391 | free_irq(dev->irq, dev); |
1386 | return -ENOMEM; | 1392 | return -ENOMEM; |