patch-2.3.51 linux/drivers/net/tulip/tulip_core.c

Next file: linux/drivers/net/wan/Config.in
Previous file: linux/drivers/net/tokenring/tms380tr.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.50/linux/drivers/net/tulip/tulip_core.c linux/drivers/net/tulip/tulip_core.c
@@ -420,8 +420,6 @@
 	tp->timer.data = (unsigned long)dev;
 	tp->timer.function = tulip_tbl[tp->chip_id].media_timer;
 	add_timer(&tp->timer);
-
-	netif_device_attach(dev);
 }
 
 
@@ -439,6 +437,8 @@
 	
 	tulip_up (dev);
 	
+	netif_start_queue (dev);
+	
 	return 0;
 }
 
@@ -652,8 +652,6 @@
 	struct tulip_private *tp = (struct tulip_private *) dev->priv;
 	unsigned long flags;
 
-	netif_device_detach (dev);
-
 	del_timer (&tp->timer);
 
 	spin_lock_irqsave (&tp->lock, flags);
@@ -686,6 +684,8 @@
 	long ioaddr = dev->base_addr;
 	struct tulip_private *tp = (struct tulip_private *) dev->priv;
 	int i;
+	
+	netif_stop_queue (dev);
 
 	tulip_down (dev);
 
@@ -1338,8 +1338,10 @@
 {
 	struct net_device *dev = pdev->driver_data;
 
-	if (dev && netif_device_present (dev))
+	if (dev && netif_device_present (dev)) {
+		netif_device_detach (dev);
 		tulip_down (dev);
+	}
 }
 
 
@@ -1347,8 +1349,10 @@
 {
 	struct net_device *dev = pdev->driver_data;
 
-	if (dev && !netif_device_present (dev))
+	if (dev && !netif_device_present (dev)) {
 		tulip_up (dev);
+		netif_device_attach (dev);
+	}
 }
 
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)