summaryrefslogtreecommitdiffstats
path: root/drivers/net/korina.c
diff options
context:
space:
mode:
authorPhil Sutter <n0-1@freewrt.org>2009-01-14 21:48:24 -0800
committerDavid S. Miller <davem@davemloft.net>2009-01-15 08:28:18 -0800
commitbeb0babfb77eab0cbcc7f64a7b8f3545fec5c0ba (patch)
tree52f050bf49bbe140496c05943450bc2820f9e02a /drivers/net/korina.c
parenta13b27826a67bfc0ca444fb42885f2069b6898e2 (diff)
downloadblackbird-op-linux-beb0babfb77eab0cbcc7f64a7b8f3545fec5c0ba.tar.gz
blackbird-op-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.c4
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);
OpenPOWER on IntegriCloud