diff options
author | Florian Fainelli <florian.fainelli@telecomint.eu> | 2008-07-13 08:32:45 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-07-22 19:59:22 -0400 |
commit | 129cf9a7028fc50b226b8021bc0b76fb38efa81d (patch) | |
tree | 0ae6da9a3bedfbfa7838ca3fce42841c18af76dd /drivers/net/r6040.c | |
parent | f2ca60f2067958e45f949e74abd580715c6c4b33 (diff) |
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: Florian Fainelli <florian.fainelli@telecomint.eu>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/r6040.c')
-rw-r--r-- | drivers/net/r6040.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/r6040.c b/drivers/net/r6040.c index 4f2ebb2e71be..5eb057d37200 100644 --- a/drivers/net/r6040.c +++ b/drivers/net/r6040.c | |||
@@ -485,6 +485,7 @@ static int r6040_close(struct net_device *dev) | |||
485 | del_timer_sync(&lp->timer); | 485 | del_timer_sync(&lp->timer); |
486 | 486 | ||
487 | spin_lock_irq(&lp->lock); | 487 | spin_lock_irq(&lp->lock); |
488 | napi_disable(&lp->napi); | ||
488 | netif_stop_queue(dev); | 489 | netif_stop_queue(dev); |
489 | r6040_down(dev); | 490 | r6040_down(dev); |
490 | spin_unlock_irq(&lp->lock); | 491 | spin_unlock_irq(&lp->lock); |
@@ -1080,8 +1081,6 @@ static int __devinit r6040_init_one(struct pci_dev *pdev, | |||
1080 | } | 1081 | } |
1081 | SET_NETDEV_DEV(dev, &pdev->dev); | 1082 | SET_NETDEV_DEV(dev, &pdev->dev); |
1082 | lp = netdev_priv(dev); | 1083 | lp = netdev_priv(dev); |
1083 | lp->pdev = pdev; | ||
1084 | lp->dev = dev; | ||
1085 | 1084 | ||
1086 | if (pci_request_regions(pdev, DRV_NAME)) { | 1085 | if (pci_request_regions(pdev, DRV_NAME)) { |
1087 | printk(KERN_ERR DRV_NAME ": Failed to request PCI regions\n"); | 1086 | 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 | 1112 | ||
1114 | /* Link new device into r6040_root_dev */ | 1113 | /* Link new device into r6040_root_dev */ |
1115 | lp->pdev = pdev; | 1114 | lp->pdev = pdev; |
1115 | lp->dev = dev; | ||
1116 | 1116 | ||
1117 | /* Init RDC private data */ | 1117 | /* Init RDC private data */ |
1118 | lp->mcr0 = 0x1002; | 1118 | lp->mcr0 = 0x1002; |