diff options
author | Phil Sutter <n0-1@freewrt.org> | 2009-01-15 00:48:24 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-01-15 11:28:18 -0500 |
commit | beb0babfb77eab0cbcc7f64a7b8f3545fec5c0ba (patch) | |
tree | 52f050bf49bbe140496c05943450bc2820f9e02a /drivers | |
parent | a13b27826a67bfc0ca444fb42885f2069b6898e2 (diff) |
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')
-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) | |||
904 | 904 | ||
905 | korina_free_ring(dev); | 905 | korina_free_ring(dev); |
906 | 906 | ||
907 | napi_disable(&lp->napi); | ||
908 | |||
907 | ret = korina_init(dev); | 909 | ret = korina_init(dev); |
908 | if (ret < 0) { | 910 | if (ret < 0) { |
909 | printk(KERN_ERR DRV_NAME "%s: cannot restart device\n", | 911 | printk(KERN_ERR DRV_NAME "%s: cannot restart device\n", |
@@ -1070,6 +1072,8 @@ static int korina_close(struct net_device *dev) | |||
1070 | 1072 | ||
1071 | korina_free_ring(dev); | 1073 | korina_free_ring(dev); |
1072 | 1074 | ||
1075 | napi_disable(&lp->napi); | ||
1076 | |||
1073 | free_irq(lp->rx_irq, dev); | 1077 | free_irq(lp->rx_irq, dev); |
1074 | free_irq(lp->tx_irq, dev); | 1078 | free_irq(lp->tx_irq, dev); |
1075 | free_irq(lp->ovr_irq, dev); | 1079 | free_irq(lp->ovr_irq, dev); |