Below is a patch to fix a problem with SCSI Host adapters that use the new error
handler.  This problem
only affects systems that have scsi compiled into the kernel, but had host
adapters that have the
use_new_eh_code flag set, and were compiled as modules.  (ie; qlogicfc)

The problem was that the scsi_error_handler() would block all signals if scsi.o
was not compiled as
a module, disregarding whether or not the host adapter was compiled as a module.

As a result, unloading a module for a host adapter would never complete, since
the scsi_error_handler task
 would never notice the signal, and never up() the semaphore.

Steve Brueggeman



--- linux-2.3.24/drivers/scsi/scsi_error.c    Thu Oct 14 16:32:18 1999
+++ linux-2.3.24.01/drivers/scsi/scsi_error.c      Mon Nov  1 12:49:20 1999
@@ -35,11 +35,8 @@
 #include "hosts.h"
 #include "constants.h"

-#ifdef MODULE
-#define SHUTDOWN_SIGS   (sigmask(SIGKILL)|sigmask(SIGINT)|sigmask(SIGTERM))
-#else
+#define SHUTDOWN_SIGS_KILLABLE
(sigmask(SIGKILL)|sigmask(SIGINT)|sigmask(SIGTERM))
 #define SHUTDOWN_SIGS   (0UL)
-#endif

 #ifdef DEBUG
 #define SENSE_TIMEOUT SCSI_TIMEOUT
@@ -1763,7 +1760,12 @@
     DECLARE_MUTEX_LOCKED(sem);
     unsigned long flags;

-    siginitsetinv(&current->blocked, SHUTDOWN_SIGS);
+    if(host->loaded_as_module) {
+         siginitsetinv(&current->blocked, SHUTDOWN_SIGS_KILLABLE);
+    } else {
+         siginitsetinv(&current->blocked, SHUTDOWN_SIGS);
+    }
+

     lock_kernel();





-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]

Reply via email to