Commit 9a3c243d authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Jeff Garzik

fs_enet: Don't call NAPI functions when NAPI is not used.

fs_enet_close() calls napi_disable() unconditionally. This patch skips the
call when use_napi isn't set.
Signed-off-by: default avatarLaurent Pinchart <laurentp@cse-semaphore.com>
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent c63eddb2
...@@ -835,7 +835,8 @@ static int fs_enet_close(struct net_device *dev) ...@@ -835,7 +835,8 @@ static int fs_enet_close(struct net_device *dev)
netif_stop_queue(dev); netif_stop_queue(dev);
netif_carrier_off(dev); netif_carrier_off(dev);
napi_disable(&fep->napi); if (fep->fpi->use_napi)
napi_disable(&fep->napi);
phy_stop(fep->phydev); phy_stop(fep->phydev);
spin_lock_irqsave(&fep->lock, flags); spin_lock_irqsave(&fep->lock, flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment