Commit beb0babf authored by Phil Sutter's avatar Phil Sutter Committed by David S. Miller

korina: disable napi on close and restart

Without this the driver will crash when the NIC is being restarted.
Signed-off-by: default avatarPhil Sutter <n0-1@freewrt.org>
Acked-by: default avatarFlorian Fainelli <florian@openwrt.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent a13b2782
...@@ -904,6 +904,8 @@ static int korina_restart(struct net_device *dev) ...@@ -904,6 +904,8 @@ static int korina_restart(struct net_device *dev)
korina_free_ring(dev); korina_free_ring(dev);
napi_disable(&lp->napi);
ret = korina_init(dev); ret = korina_init(dev);
if (ret < 0) { if (ret < 0) {
printk(KERN_ERR DRV_NAME "%s: cannot restart device\n", printk(KERN_ERR DRV_NAME "%s: cannot restart device\n",
...@@ -1070,6 +1072,8 @@ static int korina_close(struct net_device *dev) ...@@ -1070,6 +1072,8 @@ static int korina_close(struct net_device *dev)
korina_free_ring(dev); korina_free_ring(dev);
napi_disable(&lp->napi);
free_irq(lp->rx_irq, dev); free_irq(lp->rx_irq, dev);
free_irq(lp->tx_irq, dev); free_irq(lp->tx_irq, dev);
free_irq(lp->ovr_irq, dev); free_irq(lp->ovr_irq, dev);
......
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