Skip to content

Commit

Permalink
fs_enet: Don't call NAPI functions when NAPI is not used.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Laurent Pinchart authored and Jeff Garzik committed Apr 12, 2008
1 parent c63eddb commit 9a3c243
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/net/fs_enet/fs_enet-main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 9a3c243

Please sign in to comment.