Skip to content

Commit

Permalink
r6040: call napi_disable when puting down the interface and set lp->d…
Browse files Browse the repository at this point in the history
…ev 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: Florian Fainelli <florian.fainelli@telecomint.eu>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
  • Loading branch information
Florian Fainelli authored and Jeff Garzik committed Jul 22, 2008
1 parent f2ca60f commit 129cf9a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/r6040.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 129cf9a

Please sign in to comment.