netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] orinoco: unregister network device before releasing PCMCIA resources
@ 2006-05-01  6:13 Pavel Roskin
  2006-05-01  6:13 ` [PATCH 2/5] orinoco: report more relevant data on startup Pavel Roskin
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Pavel Roskin @ 2006-05-01  6:13 UTC (permalink / raw)
  To: netdev, linville

From: Pavel Roskin <proski@gnu.org>

Hardware resources should not be made available to other devices while
the network device is still registered.  Also remove the related debug
statements.

Signed-off-by: Pavel Roskin <proski@gnu.org>
---

 drivers/net/wireless/orinoco_cs.c  |    9 +++------
 drivers/net/wireless/spectrum_cs.c |    9 +++------
 2 files changed, 6 insertions(+), 12 deletions(-)

diff --git a/drivers/net/wireless/orinoco_cs.c b/drivers/net/wireless/orinoco_cs.c
index d2c48ac..ee05ec6 100644
--- a/drivers/net/wireless/orinoco_cs.c
+++ b/drivers/net/wireless/orinoco_cs.c
@@ -147,14 +147,11 @@ static void orinoco_cs_detach(struct pcm
 {
 	struct net_device *dev = link->priv;
 
+	if (link->dev_node)
+		unregister_netdev(dev);
+
 	orinoco_cs_release(link);
 
-	DEBUG(0, PFX "detach: link=%p link->dev_node=%p\n", link, link->dev_node);
-	if (link->dev_node) {
-		DEBUG(0, PFX "About to unregister net device %p\n",
-		      dev);
-		unregister_netdev(dev);
-	}
 	free_orinocodev(dev);
 }				/* orinoco_cs_detach */
 
diff --git a/drivers/net/wireless/spectrum_cs.c b/drivers/net/wireless/spectrum_cs.c
index aeb38d9..0921162 100644
--- a/drivers/net/wireless/spectrum_cs.c
+++ b/drivers/net/wireless/spectrum_cs.c
@@ -625,14 +625,11 @@ static void spectrum_cs_detach(struct pc
 {
 	struct net_device *dev = link->priv;
 
+	if (link->dev_node)
+		unregister_netdev(dev);
+
 	spectrum_cs_release(link);
 
-	DEBUG(0, PFX "detach: link=%p link->dev_node=%p\n", link, link->dev_node);
-	if (link->dev_node) {
-		DEBUG(0, PFX "About to unregister net device %p\n",
-		      dev);
-		unregister_netdev(dev);
-	}
 	free_orinocodev(dev);
 }				/* spectrum_cs_detach */
 


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

end of thread, other threads:[~2006-05-01  6:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-01  6:13 [PATCH 1/5] orinoco: unregister network device before releasing PCMCIA resources Pavel Roskin
2006-05-01  6:13 ` [PATCH 2/5] orinoco: report more relevant data on startup Pavel Roskin
2006-05-01  6:13 ` [PATCH 3/5] orinoco: simplify locking, fix error handling in PCMCIA resume Pavel Roskin
2006-05-01  6:13 ` [PATCH 4/5] orinoco: eliminate the suspend/resume functions if CONFIG_PM is unset Pavel Roskin
2006-05-01  6:13 ` [PATCH 5/5] orinoco: don't put PCI resource data to the network device Pavel Roskin

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).