Patch for scsi modules with kerneld

Bjorn Ekwall (bj0rn@blox.se)
Fri, 22 Mar 1996 13:18:21 +0100 (MET)


Hi!

I just started to use "modular" SCSI (yes, I admit it...).
To make it work nicely with kerneld, I applied the appended patch.

I also added the following lines to my "/etc/conf.modules":

alias block-major-8 sd_mod
alias scsi_hostadapter aha1542 # since that's what I have

Now everything works (for me at least :-) ).
I have some more ideas, but this is rather usable as it is, as long
as you are content with having just one (1) hostadapter in your machine.

I will add the SCSI majors to the default set known to modprobe
in my next snapshot (on my web-page). When that is done, your
/etc/conf.modules will just have to consist of the scsi_hostadapter alias.

Cheers,

Bjorn <bj0rn@blox.se> <http://www.pi.se/blox/>

--- linux/drivers/scsi/scsi.c.org Fri Mar 22 12:35:36 1996
+++ linux/drivers/scsi/scsi.c Fri Mar 22 12:44:56 1996
@@ -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>
@@ -43,8 +49,9 @@
#include "scsi.h"
#include "hosts.h"
#include "constants.h"
-
-#include <linux/config.h>
+#ifdef CONFIG_KERNELD
+#include <linux/kerneld.h>
+#endif

#undef USE_STATIC_SCSI_MEMORY

@@ -3057,6 +3064,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 */