netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 05/10] r6040: call napi_disable when puting down the interface and set lp->dev accordingly.
@ 2008-07-13 12:32 Florian Fainelli
  2008-07-16 21:01 ` Francois Romieu
  0 siblings, 1 reply; 5+ messages in thread
From: Florian Fainelli @ 2008-07-13 12:32 UTC (permalink / raw)
  To: netdev; +Cc: Francois Romieu, jeff

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>
---
diff --git a/drivers/net/r6040.c b/drivers/net/r6040.c
index 4f2ebb2..5eb057d 100644
--- a/drivers/net/r6040.c
+++ b/drivers/net/r6040.c
@@ -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;

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-07-23  0:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-13 12:32 [PATCH 05/10] r6040: call napi_disable when puting down the interface and set lp->dev accordingly Florian Fainelli
2008-07-16 21:01 ` Francois Romieu
2008-07-21 10:32   ` Florian Fainelli
2008-07-22 21:52     ` Francois Romieu
2008-07-23  0:00     ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).