Bug 23127 - RFE: kudzu should insmod scsi_hostadapter entries
RFE: kudzu should insmod scsi_hostadapter entries
Product: Red Hat Raw Hide
Classification: Retired
Component: kudzu (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
David Lawrence
Depends On:
  Show dependency treegraph
Reported: 2001-01-02 02:06 EST by Andrew Bartlett
Modified: 2014-03-16 22:17 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-02-07 13:52:32 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Strace of kudzu as requested (40.73 KB, text/plain)
2001-02-07 04:28 EST, Andrew Bartlett
no flags Details
patch to fix kudzu module loading (710 bytes, patch)
2001-02-07 13:15 EST, Bill Nottingham
no flags Details | Diff
new patch. Should work much better. (3.16 KB, patch)
2001-02-07 13:50 EST, Bill Nottingham
no flags Details | Diff

  None (edit)
Description Andrew Bartlett 2001-01-02 02:06:53 EST
If kudzu ran an insmod on all scsi_hostadapter entires (in
/etc/modules.conf) before running its scan, it could pick up items on the
scsi bus, and thefore both not erroniously delete them, but also detect new
additions.  Currently I have to use /etc/rc.d/rc.modules to make sure that
my scsi adapters are loaded before kudzu starts.  

The other way of doing this is to modify the initrd used when the system
boots, but this method creates less automated disruption to the boot
process.  (I don't want my initrd regenerated without my say-so, nor lilo
re-run, if at all possible).

It should also add its own entires as it detects hardware, and load those
modules before re-running its bus scans, therefore picking up the maximum
amount of hardware possible.

Finally if these modules are insmoded with the -k option, the module will
simply be unloaded after kudzu is finished with it, and reloaded in the
normal way when needed.
Comment 1 Bill Nottingham 2001-01-02 09:30:46 EST
Um, it *does*, as of 0.84.
Comment 2 Andrew Bartlett 2001-01-02 18:27:46 EST
Well on my test box (RedHat 7.0 with many Rawhide components, including Rawhide
kernel 2.4, Rawhide kudzu) it does not. I have my zip drive (ppa module) listed
as a scsi_hostadapter entry in /etc/modules.conf, but kudzu still doesn't load
the module, nor detect the zip drive.  

I tried to setup the system to use the initrd to load the module, but ppa has
dependincies that need to be included for it to work - dependincies that arn't
an issue if the modules are loaded after the system is properly stated. 

I can only get kudzu to detect it if I manualy load it before kudzu starts

As to recurcive lookups on detected devices, that was a particular probem with
an earlier (RH 6.2) version, but I did check the change-log.
Comment 3 Bill Nottingham 2001-01-02 18:32:56 EST
What version of kudzu do you have installed?
Comment 4 Andrew Bartlett 2001-01-02 18:50:57 EST
kudzu-0.89-1 downloaded and recomplied on my RedHat 7.0/Rawhide-updated box.
Comment 5 Bill Nottingham 2001-01-02 21:55:03 EST
What's your /etc/modules.conf look like?
Comment 6 Andrew Bartlett 2001-01-02 22:04:06 EST

alias eth0 ne2k-pci 
alias parport_lowlevel parport_pc 
alias usb-controller usb-uhci 
alias scsi_hostadapter ppa
Comment 7 Bill Nottingham 2001-02-07 01:24:27 EST
Sorry about the delay.

What happens if you just run 'modprobe ppa' from the command line - does
it work, or does it require other stuff (parport?) configured separately?

Basically, kudzu blindly does 'modprobe scsi_hostadapter' and assumes it
will work, or if it doesn't, that there isn't anything it can do about it.
Comment 8 Andrew Bartlett 2001-02-07 02:07:09 EST
'modprobe ppa' and 'modprobe scsi_hostadapter' run as expected.  When run in
/etc/rc.modules it also runs as expected (so its not a boot order thing).
Comment 9 Bill Nottingham 2001-02-07 02:15:53 EST
OK, I'm confused. If you run 'strace -fo <some file> kudzu -s', does
it appear to be forking and running modprobe?
Comment 10 Andrew Bartlett 2001-02-07 04:28:17 EST
Created attachment 9200 [details]
Strace of kudzu as requested
Comment 11 Andrew Bartlett 2001-02-07 04:32:32 EST
I've attached the strace, as I can't see the fork - but I may have missed it.

Comment 12 Bill Nottingham 2001-02-07 13:14:37 EST
Oops, that logic is really screwed up. If you rebuild with the attached
patch, does it work better?
Comment 13 Bill Nottingham 2001-02-07 13:15:19 EST
Created attachment 9263 [details]
patch to fix kudzu module loading
Comment 14 Bill Nottingham 2001-02-07 13:24:21 EST
Never mind, it's more complicated than that. Ugh.
Comment 15 Bill Nottingham 2001-02-07 13:50:10 EST
OK, take two. This appears to work here; basically, if we're keeping track
of which modules kudzu loads, so we can remove them later, we need to deal
with actual module names, *not* aliases.
Comment 16 Bill Nottingham 2001-02-07 13:50:57 EST
Created attachment 9279 [details]
new patch. Should work much better.
Comment 17 Bill Nottingham 2001-02-07 13:52:27 EST
To clarify, use the second patch *instead* of the first one, not on top of it.
Comment 18 Bill Nottingham 2001-02-07 14:06:30 EST
This should be fixed in kudzu-0.93-1; please reopen if the patch doesn't
work for you (it works for me, but I'm not testing it on a system with
a ppa adapter.)

Note You need to log in before you can comment on or make changes to this bug.