patch-1.3.82 linux/drivers/scsi/scsi.c

Next file: linux/drivers/scsi/seagate.c
Previous file: linux/drivers/scsi/aha1542.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.81/linux/drivers/scsi/scsi.c linux/drivers/scsi/scsi.c
@@ -19,6 +19,10 @@
  *
  *  Native multichannel and wide scsi support added 
  *  by Michael Neuffer neuffer@goofy.zdv.uni-mainz.de
+ *
+ *  Added request_module("scsi_hostadapter") for kerneld:
+ *  (Put an "alias scsi_hostadapter your_hostadapter" in /etc/conf.modules)
+ *  Bjorn Ekwall  <bj0rn@blox.se>
  */
 
 /*
@@ -26,6 +30,8 @@
  * symbol tables.
  */
 #define _SCSI_SYMS_VER_
+
+#include <linux/config.h>
 #include <linux/module.h>
 
 #include <asm/system.h>
@@ -44,7 +50,9 @@
 #include "hosts.h"
 #include "constants.h"
 
-#include <linux/config.h>
+#ifdef CONFIG_KERNELD
+#include <linux/kerneld.h>
+#endif
 
 #undef USE_STATIC_SCSI_MEMORY
 
@@ -608,6 +616,15 @@
     return 0;     /* assume no peripheral if any sort of error */
 
   /*
+   * Check the peripheral qualifier field - this tells us whether LUNS
+   * are supported here or not.
+   */
+  if( (scsi_result[0] >> 5) == 3 )
+    {
+      return 0;     /* assume no peripheral if any sort of error */
+    }
+
+  /*
    * It would seem some TOSHIBA CDROM gets things wrong
    */
   if (!strncmp (scsi_result + 8, "TOSHIBA", 7) &&
@@ -3058,6 +3075,10 @@
 	
 	/* Load upper level device handler of some kind */
     case MODULE_SCSI_DEV:
+#ifdef CONFIG_KERNELD
+	if (scsi_hosts == NULL)
+		request_module("scsi_hostadapter");
+#endif
 	return scsi_register_device_module((struct Scsi_Device_Template *) ptr);
 	/* The rest of these are not yet implemented */
 	

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this