patch-2.3.47 linux/drivers/net/pcmcia/3c574_cs.c
Next file: linux/drivers/net/pcmcia/3c575_cb.c
Previous file: linux/drivers/net/ni52.c
Back to the patch index
Back to the overall index
- Lines: 71
- Date:
Thu Feb 17 09:18:47 2000
- Orig file:
v2.3.46/linux/drivers/net/pcmcia/3c574_cs.c
- Orig date:
Wed Feb 16 17:03:52 2000
diff -u --recursive --new-file v2.3.46/linux/drivers/net/pcmcia/3c574_cs.c linux/drivers/net/pcmcia/3c574_cs.c
@@ -627,8 +627,7 @@
case CS_EVENT_CARD_REMOVAL:
link->state &= ~DEV_PRESENT;
if (link->state & DEV_CONFIG) {
- netif_stop_queue (dev);
- clear_bit(LINK_STATE_START, &dev->state);
+ netif_device_detach(dev);
link->release.expires = jiffies + HZ/20;
add_timer(&link->release);
}
@@ -642,10 +641,9 @@
/* Fall through... */
case CS_EVENT_RESET_PHYSICAL:
if (link->state & DEV_CONFIG) {
- if (link->open) {
- netif_stop_queue (dev);
- clear_bit(LINK_STATE_START, &dev->state);
- }
+ if (link->open)
+ netif_device_detach(dev);
+
CardServices(ReleaseConfiguration, link->handle);
}
break;
@@ -657,8 +655,7 @@
CardServices(RequestConfiguration, link->handle, &link->conf);
if (link->open) {
tc574_reset(dev);
- set_bit(LINK_STATE_START, &dev->state);
- netif_start_queue (dev);
+ netif_device_attach(dev);
}
}
break;
@@ -953,7 +950,7 @@
ioaddr_t ioaddr, status;
int work_budget = max_interrupt_work;
- if (!test_bit(LINK_STATE_START, &dev->state))
+ if (!netif_device_present(dev))
return;
spin_lock (&lp->lock);
@@ -966,8 +963,7 @@
while ((status = inw(ioaddr + EL3_STATUS)) &
(IntLatch | RxComplete | RxEarly | StatsFull)) {
- if (!test_bit(LINK_STATE_START, &dev->state) ||
- ((status & 0xe000) != 0x2000)) {
+ if (!netif_device_present(dev) || ((status & 0xe000) != 0x2000)) {
DEBUG(1, "%s: Interrupt from dead card\n", dev->name);
break;
}
@@ -1047,7 +1043,7 @@
u_long flags;
u_short /* cable, */ media, partner;
- if (!test_bit(LINK_STATE_START, &dev->state))
+ if (!netif_device_present(dev))
goto reschedule;
/* Check for pending interrupt with expired latency timer: with
@@ -1118,7 +1114,7 @@
{
struct el3_private *lp = (struct el3_private *)dev->priv;
- if (test_bit(LINK_STATE_START, &dev->state))
+ if (netif_device_present(dev))
update_stats(dev);
return &lp->stats;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)