patch-2.3.47 linux/drivers/net/pcmcia/smc91c92_cs.c
Next file: linux/drivers/net/pcmcia/tulip_cb.c
Previous file: linux/drivers/net/pcmcia/ray_cs.c
Back to the patch index
Back to the overall index
- Lines: 52
- Date:
Thu Feb 17 09:18:47 2000
- Orig file:
v2.3.46/linux/drivers/net/pcmcia/smc91c92_cs.c
- Orig date:
Wed Feb 16 17:03:52 2000
diff -u --recursive --new-file v2.3.46/linux/drivers/net/pcmcia/smc91c92_cs.c linux/drivers/net/pcmcia/smc91c92_cs.c
@@ -1112,8 +1112,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;
link->state |= DEV_RELEASE_PENDING;
add_timer(&link->release);
@@ -1128,10 +1127,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;
@@ -1154,8 +1152,7 @@
}
if (link->open) {
smc_reset(dev);
- set_bit(LINK_STATE_START, &dev->state);
- netif_start_queue (dev);
+ netif_device_attach(dev);
}
}
break;
@@ -1506,7 +1503,7 @@
u_short saved_bank, saved_pointer, mask, status;
char bogus_cnt = INTR_WORK; /* Work we are willing to do. */
- if ((smc == NULL) || !test_bit(LINK_STATE_START, &dev->state))
+ if ((smc == NULL) || !netif_device_present(dev))
return;
ioaddr = dev->base_addr;
@@ -1910,7 +1907,7 @@
ioaddr_t ioaddr = dev->base_addr;
u_short i, media, saved_bank;
- if (!test_bit(LINK_STATE_START, &dev->state))
+ if (!netif_device_present(dev))
goto reschedule;
saved_bank = inw(ioaddr + BANK_SELECT);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)