Commit 976c09eb authored by Christoph Hellwig's avatar Christoph Hellwig Committed by James Bottomley

[PATCH] nuke some junk from the pcmcia scsi drivers

DEV_STALE_* is used for some crude hacks in pcmcia netdrivers and it
seems people copied it blindly over to the scsi ones also it couldn't
ever be triggered (dev_link_t.open is never incremented e.g.)
parent cb498765
......@@ -177,13 +177,8 @@ static void aha152x_detach(dev_link_t *link)
if (*linkp == NULL)
return;
if (link->state & DEV_CONFIG) {
if (link->state & DEV_CONFIG)
aha152x_release_cs(link);
if (link->state & DEV_STALE_CONFIG) {
link->state |= DEV_STALE_LINK;
return;
}
}
if (link->handle)
CardServices(DeregisterClient, link->handle);
......@@ -302,9 +297,6 @@ static void aha152x_release_cs(dev_link_t *link)
link->state &= ~DEV_CONFIG;
scsi_unregister(info->host);
if (link->state & DEV_STALE_LINK)
aha152x_detach(link);
}
static int aha152x_event(event_t event, int priority,
......
......@@ -166,13 +166,8 @@ static void fdomain_detach(dev_link_t *link)
if (*linkp == NULL)
return;
if (link->state & DEV_CONFIG) {
if (link->state & DEV_CONFIG)
fdomain_release(link);
if (link->state & DEV_STALE_CONFIG) {
link->state |= DEV_STALE_LINK;
return;
}
}
if (link->handle)
CardServices(DeregisterClient, link->handle);
......@@ -283,9 +278,7 @@ static void fdomain_release(dev_link_t *link)
scsi_unregister(info->host);
link->state &= ~DEV_CONFIG;
if (link->state & DEV_STALE_LINK)
fdomain_detach(link);
} /* fdomain_release */
}
/*====================================================================*/
......
......@@ -1553,18 +1553,12 @@ static void nsp_cs_detach(dev_link_t *link)
return;
}
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) {
if (link->handle)
CardServices(DeregisterClient, link->handle);
}
/* Unlink device structure, free bits */
*linkp = link->next;
......@@ -1792,17 +1786,6 @@ static void nsp_cs_release(dev_link_t *link)
DEBUG(0, "%s(0x%p)\n", __FUNCTION__, link);
/*
* If the device is currently in use, we won't release until it
* is actually closed.
*/
if (link->open) {
DEBUG(1, "nsp_cs: release postponed, '%s' still open\n",
link->dev->dev_name);
link->state |= DEV_STALE_CONFIG;
return;
}
/* Unlink the device chain */
#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,5,2))
scsi_unregister_module(MODULE_SCSI_HA, &nsp_driver_template);
......@@ -1824,11 +1807,7 @@ static void nsp_cs_release(dev_link_t *link)
CardServices(ReleaseIRQ, link->handle, &link->irq);
}
link->state &= ~DEV_CONFIG;
if (link->state & DEV_STALE_LINK) {
nsp_cs_detach(link);
}
} /* nsp_cs_release */
}
/*======================================================================
......
......@@ -165,13 +165,8 @@ static void qlogic_detach(dev_link_t * link)
if (*linkp == NULL)
return;
if (link->state & DEV_CONFIG) {
if (link->state & DEV_CONFIG)
qlogic_release(link);
if (link->state & DEV_STALE_CONFIG) {
link->state |= DEV_STALE_LINK;
return;
}
}
if (link->handle)
CardServices(DeregisterClient, link->handle);
......@@ -296,9 +291,7 @@ static void qlogic_release(dev_link_t *link)
scsi_unregister(info->host);
link->state &= ~DEV_CONFIG;
if (link->state & DEV_STALE_LINK)
qlogic_detach(link);
} /* qlogic_release */
}
/*====================================================================*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment