diff options
author | Phil Sutter <n0-1@freewrt.org> | 2009-01-15 06:48:24 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-15 17:28:18 +0100 |
commit | beb0babfb77eab0cbcc7f64a7b8f3545fec5c0ba (patch) | |
tree | 52f050bf49bbe140496c05943450bc2820f9e02a /drivers/net/korina.c | |
parent | korina: reset resource buffer size to 1536 (diff) | |
download | linux-beb0babfb77eab0cbcc7f64a7b8f3545fec5c0ba.tar.xz linux-beb0babfb77eab0cbcc7f64a7b8f3545fec5c0ba.zip |
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); |