mirror of
https://github.com/torvalds/linux.git
synced 2024-12-28 05:41:55 +00:00
korina: disable napi on close and restart
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>
This commit is contained in:
parent
a13b27826a
commit
beb0babfb7
@ -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",
|
||||
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user