patch-2.3.47 linux/drivers/net/pcmcia/tulip_cb.c

Next file: linux/drivers/net/pcmcia/wavelan_cs.c
Previous file: linux/drivers/net/pcmcia/smc91c92_cs.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.46/linux/drivers/net/pcmcia/tulip_cb.c linux/drivers/net/pcmcia/tulip_cb.c
@@ -2713,8 +2713,6 @@
 	long ioaddr = dev->base_addr;
 	struct tulip_private *tp = (struct tulip_private *)dev->priv;
 
-	netif_stop_queue (dev);
-
 	/* Disable interrupts by clearing the interrupt mask. */
 	outl(0x00000000, ioaddr + CSR7);
 	/* Stop the chip's Tx and Rx processes. */
@@ -2726,8 +2724,6 @@
 	if (inl(ioaddr + CSR6) != 0xffffffff)
 		tp->stats.rx_missed_errors += inl(ioaddr + CSR8) & 0xffff;
 
-	del_timer(&tp->timer);
-
 	dev->if_port = tp->saved_if_port;
 }
 
@@ -2742,9 +2738,13 @@
 		printk(KERN_DEBUG "%s: Shutting down ethercard, status was %2.2x.\n",
 			   dev->name, inl(ioaddr + CSR5));
 
-	if (test_bit(LINK_STATE_START, &dev->state))
+	netif_stop_queue(dev);
+
+	if (netif_device_present(dev))
 		tulip_down(dev);
 
+	del_timer(&tp->timer);
+
 	free_irq(dev->irq, dev);
 
 	/* Free all the skbuffs in the Rx queue. */
@@ -2774,7 +2774,7 @@
 	struct tulip_private *tp = (struct tulip_private *)dev->priv;
 	long ioaddr = dev->base_addr;
 
-	if (test_bit(LINK_STATE_START, &dev->state))
+	if (netif_device_present(dev))
 		tp->stats.rx_missed_errors += inl(ioaddr + CSR8) & 0xffff;
 
 	return &tp->stats;

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