]> pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
r6040: call napi_disable when puting down the interface and set lp->dev accordingly.
authorFlorian Fainelli <florian.fainelli@telecomint.eu>
Sun, 13 Jul 2008 12:32:45 +0000 (14:32 +0200)
committerJeff Garzik <jgarzik@redhat.com>
Tue, 22 Jul 2008 23:59:22 +0000 (19:59 -0400)
We did not call napi_disabled when putting down the interface
which should be done. Finally initialize lp->dev when everything
is set.

Signed-off-by: Florian Fainelli <florian.fainelli@telecomint.eu>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
drivers/net/r6040.c

index 4f2ebb2e71be36b7c6288535a65b0bc362c97994..5eb057d372001971ae3906249b3e957d772de15d 100644 (file)
@@ -485,6 +485,7 @@ static int r6040_close(struct net_device *dev)
        del_timer_sync(&lp->timer);
 
        spin_lock_irq(&lp->lock);
+       napi_disable(&lp->napi);
        netif_stop_queue(dev);
        r6040_down(dev);
        spin_unlock_irq(&lp->lock);
@@ -1080,8 +1081,6 @@ static int __devinit r6040_init_one(struct pci_dev *pdev,
        }
        SET_NETDEV_DEV(dev, &pdev->dev);
        lp = netdev_priv(dev);
-       lp->pdev = pdev;
-       lp->dev = dev;
 
        if (pci_request_regions(pdev, DRV_NAME)) {
                printk(KERN_ERR DRV_NAME ": Failed to request PCI regions\n");
@@ -1113,6 +1112,7 @@ static int __devinit r6040_init_one(struct pci_dev *pdev,
 
        /* Link new device into r6040_root_dev */
        lp->pdev = pdev;
+       lp->dev = dev;
 
        /* Init RDC private data */
        lp->mcr0 = 0x1002;