Red Hat Bugzilla – Bug 23127
RFE: kudzu should insmod scsi_hostadapter entries
Last modified: 2014-03-16 22:17:53 EDT
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.
Um, it *does*, as of 0.84.
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.
What version of kudzu do you have installed?
kudzu-0.89-1 downloaded and recomplied on my RedHat 7.0/Rawhide-updated box.
What's your /etc/modules.conf look like?
alias eth0 ne2k-pci
alias parport_lowlevel parport_pc
alias usb-controller usb-uhci
alias scsi_hostadapter ppa
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.
'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).
OK, I'm confused. If you run 'strace -fo <some file> kudzu -s', does
it appear to be forking and running modprobe?
Created attachment 9200 [details]
Strace of kudzu as requested
I've attached the strace, as I can't see the fork - but I may have missed it.
Oops, that logic is really screwed up. If you rebuild with the attached
patch, does it work better?
Created attachment 9263 [details]
patch to fix kudzu module loading
Never mind, it's more complicated than that. Ugh.
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.
Created attachment 9279 [details]
new patch. Should work much better.
To clarify, use the second patch *instead* of the first one, not on top of it.
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.)