diff options
author | Phil Sutter <n0-1@freewrt.org> | 2009-01-15 08:48:24 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-15 19:28:18 +0300 |
commit | beb0babfb77eab0cbcc7f64a7b8f3545fec5c0ba (patch) | |
tree | 52f050bf49bbe140496c05943450bc2820f9e02a /drivers/net/korina.c | |
parent | a13b27826a67bfc0ca444fb42885f2069b6898e2 (diff) | |
download | linux-beb0babfb77eab0cbcc7f64a7b8f3545fec5c0ba.tar.xz |
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>
Diffstat (limited to 'drivers/net/korina.c')
-rw-r--r-- | drivers/net/korina.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/korina.c b/drivers/net/korina.c index e30c2f437d19..65b8487c1896 100644 --- a/drivers/net/korina.c +++ b/drivers/net/korina.c @@ -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); |