fs_enet: Don't call NAPI functions when NAPI is not used.
authorLaurent Pinchart <laurentp@cse-semaphore.com>
Fri, 11 Apr 2008 12:05:50 +0000 (14:05 +0200)
committerJeff Garzik <jgarzik@redhat.com>
Sat, 12 Apr 2008 05:52:38 +0000 (01:52 -0400)
fs_enet_close() calls napi_disable() unconditionally. This patch skips the
call when use_napi isn't set.

Signed-off-by: Laurent Pinchart <laurentp@cse-semaphore.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/net/fs_enet/fs_enet-main.c

index af869cf9ae7d7278fdae1b717431c0f7447476b3..940e2041ba3832de9dbb4b57351cac6775bc5cac 100644 (file)
@@ -835,7 +835,8 @@ static int fs_enet_close(struct net_device *dev)
 
        netif_stop_queue(dev);
        netif_carrier_off(dev);
-       napi_disable(&fep->napi);
+       if (fep->fpi->use_napi)
+               napi_disable(&fep->napi);
        phy_stop(fep->phydev);
 
        spin_lock_irqsave(&fep->lock, flags);