nuke some junk from the pcmcia scsi drivers
Subsystems (3)
PATCH 1/1 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.)
drivers/scsi/pcmcia/aha152x_stub.c +1 -9
@@ -177,13 +177,8 @@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 @@ 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,
drivers/scsi/pcmcia/fdomain_stub.c +2 -9
@@ -166,13 +166,8 @@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 @@scsi_unregister (info->host); link->state &= ~DEV_CONFIG ; -if (link->state &DEV_STALE_LINK ) -fdomain_detach (link); -}/* fdomain_release */ +}/*====================================================================*/
drivers/scsi/pcmcia/nsp_cs.c +3 -24
@@ -1553,18 +1553,12 @@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 @@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 @@CardServices (ReleaseIRQ, link->handle, &link->irq); } link->state &= ~DEV_CONFIG ; - -if (link->state &DEV_STALE_LINK ) { -nsp_cs_detach (link); - } -}/* nsp_cs_release */ +}/*======================================================================
drivers/scsi/pcmcia/qlogic_stub.c +2 -9
@@ -165,13 +165,8 @@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 @@scsi_unregister (info->host); link->state &= ~DEV_CONFIG ; -if (link->state &DEV_STALE_LINK ) -qlogic_detach (link); -}/* qlogic_release */ +}/*====================================================================*/
Quoted 3 lines · Christoph Hellwig
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.)
I'm totally unfamiliar with the code involved, but it occurs to me that there may be dependencies in the SCSI drivers for PCMCIA code due to PCMCIA-based SCSI adapters (e.g., Adaptec 1480). Someone may need to confirm if the DEV_STALE_* references are there to handle PCMCIA-SCSI adapters.
--
Jeff Woods <[email protected]>
Adaptec 1480 user
Quoted 5 lines · Jeff Woods
I'm totally unfamiliar with the code involved, but it occurs to me that there may be dependencies in the SCSI drivers for PCMCIA code due to PCMCIA-based SCSI adapters (e.g., Adaptec 1480). Someone may need to confirm if the DEV_STALE_* references are there to handle PCMCIA-SCSI adapters.
Umm, this code can't be triggered. These bits aren't touched by generic pcmcia code but only set by the individual drivers.
Btw, are you using 2.6? There might be some other issue with pcmcia scsi..