nsp_dbg(NSP_DEBUG_INIT, "info=0x%p", info);
- /* Initialize the dev_link_t structure */
- init_timer(&link->release);
- link->release.function = (void (*)(unsigned long))(&nsp_cs_release);
- link->release.data = (unsigned long)link;
-
/* The io structure describes IO port mapping */
link->io.NumPorts1 = 0x10;
link->io.Attributes1 = IO_DATA_PATH_WIDTH_AUTO;
return;
}
- del_timer(&link->release);
- if (link->state & DEV_CONFIG) {
+ if (link->state & DEV_CONFIG)
nsp_cs_release(link);
- if (link->state & DEV_STALE_CONFIG) {
- link->state |= DEV_STALE_LINK;
- return;
- }
- }
/* Break the link with Card Services */
if (link->handle) {
nsp_dbg(NSP_DEBUG_INIT, "link=0x%p", link);
- /*
- * If the device is currently in use, we won't release until it
- * is actually closed.
- */
- if (link->open) {
- nsp_dbg(NSP_DEBUG_INIT, "release postponed, '%s' still open",
- link->dev->dev_name);
- link->state |= DEV_STALE_CONFIG;
- return;
- }
-
/* Unlink the device chain */
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,2))
if (info->host != NULL) {
scsi_host_put(info->host);
}
#endif
-
- if (link->state & DEV_STALE_LINK) {
- nsp_dbg(NSP_DEBUG_INIT, "stale link");
- nsp_cs_detach(link);
- }
} /* nsp_cs_release */
/*======================================================================
link->state &= ~DEV_PRESENT;
if (link->state & DEV_CONFIG) {
((scsi_info_t *)link->priv)->stop = 1;
- mod_timer(&link->release, jiffies + HZ/20);
+ nsp_cs_release(link);
}
break;
/* XXX: this really needs to move into generic code.. */
while (dev_list != NULL) {
- del_timer(&dev_list->release);
if (dev_list->state & DEV_CONFIG) {
nsp_cs_release(dev_list);
}