public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] nuke some junk from the pcmcia scsi drivers
@ 2003-08-08 19:10 Christoph Hellwig
  2003-08-08 23:18 ` Jeff Woods
  0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2003-08-08 19:10 UTC (permalink / raw)
  To: James Bottomley; +Cc: SCSI Mailing List

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.)


diff -Nru a/drivers/scsi/pcmcia/aha152x_stub.c b/drivers/scsi/pcmcia/aha152x_stub.c
--- a/drivers/scsi/pcmcia/aha152x_stub.c	Fri Aug  8 11:12:56 2003
+++ b/drivers/scsi/pcmcia/aha152x_stub.c	Fri Aug  8 11:12:56 2003
@@ -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,
diff -Nru a/drivers/scsi/pcmcia/fdomain_stub.c b/drivers/scsi/pcmcia/fdomain_stub.c
--- a/drivers/scsi/pcmcia/fdomain_stub.c	Fri Aug  8 11:12:56 2003
+++ b/drivers/scsi/pcmcia/fdomain_stub.c	Fri Aug  8 11:12:56 2003
@@ -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 */
+}
 
 /*====================================================================*/
 
diff -Nru a/drivers/scsi/pcmcia/nsp_cs.c b/drivers/scsi/pcmcia/nsp_cs.c
--- a/drivers/scsi/pcmcia/nsp_cs.c	Fri Aug  8 11:12:56 2003
+++ b/drivers/scsi/pcmcia/nsp_cs.c	Fri Aug  8 11:12:56 2003
@@ -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 */
+}
 
 /*======================================================================
 
diff -Nru a/drivers/scsi/pcmcia/qlogic_stub.c b/drivers/scsi/pcmcia/qlogic_stub.c
--- a/drivers/scsi/pcmcia/qlogic_stub.c	Fri Aug  8 11:12:56 2003
+++ b/drivers/scsi/pcmcia/qlogic_stub.c	Fri Aug  8 11:12:56 2003
@@ -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 */
+}
 
 /*====================================================================*/
 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] nuke some junk from the pcmcia scsi drivers
  2003-08-08 19:10 [PATCH] nuke some junk from the pcmcia scsi drivers Christoph Hellwig
@ 2003-08-08 23:18 ` Jeff Woods
  2003-08-09  3:31   ` Christoph Hellwig
  0 siblings, 1 reply; 3+ messages in thread
From: Jeff Woods @ 2003-08-08 23:18 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: James Bottomley, SCSI Mailing List

At +0200 09:10 PM 8/8/2003, Christoph Hellwig wrote:
>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 <jdw@apple2.com>
Adaptec 1480 user



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] nuke some junk from the pcmcia scsi drivers
  2003-08-08 23:18 ` Jeff Woods
@ 2003-08-09  3:31   ` Christoph Hellwig
  0 siblings, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2003-08-09  3:31 UTC (permalink / raw)
  To: Jeff Woods; +Cc: James Bottomley, SCSI Mailing List

On Fri, Aug 08, 2003 at 04:18:11PM -0700, Jeff Woods wrote:
> 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..

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-08-09  3:31 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-08 19:10 [PATCH] nuke some junk from the pcmcia scsi drivers Christoph Hellwig
2003-08-08 23:18 ` Jeff Woods
2003-08-09  3:31   ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox