From: Torben Mathiasen <torben@kernel.dk>
To: strieder@student.uni-kl.de
Cc: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org
Subject: Re: SCSI modules and kmod
Date: Fri, 8 Dec 2000 02:30:07 +0100 [thread overview]
Message-ID: <20001208023007.A10269@torben> (raw)
In-Reply-To: <3A2FD00F.E7449D2D@student.uni-kl.de>
In-Reply-To: <3A2FD00F.E7449D2D@student.uni-kl.de>; from strieder@student.uni-kl.de on Thu, Dec 07, 2000 at 06:59:43PM +0100
[-- Attachment #1: Type: text/plain, Size: 1283 bytes --]
On Thu, Dec 07 2000, strieder@student.uni-kl.de wrote:
[deleted]
> int regdevresult;
> ....
> case MODULE_SCSI_DEV:
> #ifdef CONFIG_KMOD
> if (scsi_hosts == NULL)
> {
> request_module("scsi_hostadapter");
> return scsi_register_device_module((struct
> Scsi_Device_Template *) ptr);
> }
> #endif
> regdevresult = scsi_register_device_module((struct
> Scsi_Device_Template *) ptr);
> #ifdef CONFIG_KMOD
> if (regdevresult != 0) /* is this the right case? */
> request_module("scsi_hostadapter");
> regdevresult = scsi_register_device_module((struct
> Scsi_Device_Template *) ptr);
> #endif
> return regdevresult;
>
This won't work. scsi_register_device_module returns 0 when the
driver loads ok, not when a device was actually found. Remember
its possible to load the sd driver with no host adapter present.
How about just removing the check for scsi_hosts == NULL. If some
hostadapter was already loaded, so be it. It won't change anything,
besides maybe more devices beeing loaded which shouldn't hurt anyone.
Small patch attached (against t12p7). Not tested, not even compiled.
--
Torben Mathiasen <torben@kernel.dk>
Linux ThunderLAN maintainer
http://tlan.kernel.dk
[-- Attachment #2: scsi.diff --]
[-- Type: text/plain, Size: 621 bytes --]
--- /opt/kernel/kernels/linux/drivers/scsi/scsi.c Wed Nov 1 15:04:02 2000
+++ linux/drivers/scsi/scsi.c Fri Dec 8 02:13:47 2000
@@ -2322,11 +2322,9 @@
/* Load upper level device handler of some kind */
case MODULE_SCSI_DEV:
#ifdef CONFIG_KMOD
- if (scsi_hosts == NULL)
- request_module("scsi_hostadapter");
+ request_module("scsi_hostadapter");
#endif
- return scsi_register_device_module((struct Scsi_Device_Template *) ptr);
- /* The rest of these are not yet implemented */
+ return scsi_register_device_module((struct Scsi_Device_Template *) ptr);
/* Load constants.o */
case MODULE_SCSI_CONST:
prev parent reply other threads:[~2000-12-08 1:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-12-07 17:59 SCSI modules and kmod strieder
2000-12-08 1:30 ` Torben Mathiasen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20001208023007.A10269@torben \
--to=torben@kernel.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=strieder@student.uni-kl.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox