Commit 129cf9a7 authored by Florian Fainelli's avatar Florian Fainelli Committed by Jeff Garzik

r6040: call napi_disable when puting down the interface and set lp->dev accordingly.

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: default avatarFlorian Fainelli <florian.fainelli@telecomint.eu>
Signed-off-by: default avatarJeff Garzik <jgarzik@redhat.com>
parent f2ca60f2
...@@ -485,6 +485,7 @@ static int r6040_close(struct net_device *dev) ...@@ -485,6 +485,7 @@ static int r6040_close(struct net_device *dev)
del_timer_sync(&lp->timer); del_timer_sync(&lp->timer);
spin_lock_irq(&lp->lock); spin_lock_irq(&lp->lock);
napi_disable(&lp->napi);
netif_stop_queue(dev); netif_stop_queue(dev);
r6040_down(dev); r6040_down(dev);
spin_unlock_irq(&lp->lock); spin_unlock_irq(&lp->lock);
...@@ -1080,8 +1081,6 @@ static int __devinit r6040_init_one(struct pci_dev *pdev, ...@@ -1080,8 +1081,6 @@ static int __devinit r6040_init_one(struct pci_dev *pdev,
} }
SET_NETDEV_DEV(dev, &pdev->dev); SET_NETDEV_DEV(dev, &pdev->dev);
lp = netdev_priv(dev); lp = netdev_priv(dev);
lp->pdev = pdev;
lp->dev = dev;
if (pci_request_regions(pdev, DRV_NAME)) { if (pci_request_regions(pdev, DRV_NAME)) {
printk(KERN_ERR DRV_NAME ": Failed to request PCI regions\n"); 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, ...@@ -1113,6 +1112,7 @@ static int __devinit r6040_init_one(struct pci_dev *pdev,
/* Link new device into r6040_root_dev */ /* Link new device into r6040_root_dev */
lp->pdev = pdev; lp->pdev = pdev;
lp->dev = dev;
/* Init RDC private data */ /* Init RDC private data */
lp->mcr0 = 0x1002; lp->mcr0 = 0x1002;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment