Skip to content

Commit

Permalink
korina: disable napi on close and restart
Browse files Browse the repository at this point in the history
Without this the driver will crash when the NIC is being restarted.

Signed-off-by: Phil Sutter <n0-1@freewrt.org>
Acked-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Phil Sutter authored and David S. Miller committed Jan 15, 2009
1 parent a13b278 commit beb0bab
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/korina.c
Original file line number Diff line number Diff line change
Expand Up @@ -904,6 +904,8 @@ static int korina_restart(struct net_device *dev)

korina_free_ring(dev);

napi_disable(&lp->napi);

ret = korina_init(dev);
if (ret < 0) {
printk(KERN_ERR DRV_NAME "%s: cannot restart device\n",
Expand Down Expand Up @@ -1070,6 +1072,8 @@ static int korina_close(struct net_device *dev)

korina_free_ring(dev);

napi_disable(&lp->napi);

free_irq(lp->rx_irq, dev);
free_irq(lp->tx_irq, dev);
free_irq(lp->ovr_irq, dev);
Expand Down

0 comments on commit beb0bab

Please sign in to comment.