]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
korina: disable napi on close and restart
authorPhil Sutter <n0-1@freewrt.org>
Thu, 15 Jan 2009 05:48:24 +0000 (21:48 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 15 Jan 2009 16:28:18 +0000 (08:28 -0800)
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>
drivers/net/korina.c

index e30c2f437d193c22ca065c9f8255422d33c88c72..65b8487c1896c5afe9570b6c0aa22bb6f6f6d0b5 100644 (file)
@@ -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);