Bug 23127 - RFE: kudzu should insmod scsi_hostadapter entries
Summary: RFE: kudzu should insmod scsi_hostadapter entries
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: kudzu   
(Show other bugs)
Version: 1.0
Hardware: i386 Linux
Target Milestone: ---
Assignee: Bill Nottingham
QA Contact: David Lawrence
Depends On:
TreeView+ depends on / blocked
Reported: 2001-01-02 07:06 UTC by Andrew Bartlett
Modified: 2014-03-17 02:17 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-02-07 18:52:32 UTC
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 09:28 UTC, Andrew Bartlett
no flags Details
patch to fix kudzu module loading (710 bytes, patch)
2001-02-07 18:15 UTC, Bill Nottingham
no flags Details | Diff
new patch. Should work much better. (3.16 KB, patch)
2001-02-07 18:50 UTC, Bill Nottingham
no flags Details | Diff

Description Andrew Bartlett 2001-01-02 07:06:53 UTC
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 14:30:46 UTC
Um, it *does*, as of 0.84.

Comment 2 Andrew Bartlett 2001-01-02 23:27:46 UTC
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 23:32:56 UTC
What version of kudzu do you have installed?

Comment 4 Andrew Bartlett 2001-01-02 23:50:57 UTC
kudzu-0.89-1 downloaded and recomplied on my RedHat 7.0/Rawhide-updated box.

Comment 5 Bill Nottingham 2001-01-03 02:55:03 UTC
What's your /etc/modules.conf look like?

Comment 6 Andrew Bartlett 2001-01-03 03:04:06 UTC

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 06:24:27 UTC
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 07:07:09 UTC
'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 07:15:53 UTC
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 09:28:17 UTC
Created attachment 9200 [details]
Strace of kudzu as requested

Comment 11 Andrew Bartlett 2001-02-07 09:32:32 UTC
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 18:14:37 UTC
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 18:15:19 UTC
Created attachment 9263 [details]
patch to fix kudzu module loading

Comment 14 Bill Nottingham 2001-02-07 18:24:21 UTC
Never mind, it's more complicated than that. Ugh.

Comment 15 Bill Nottingham 2001-02-07 18:50:10 UTC
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 18:50:57 UTC
Created attachment 9279 [details]
new patch. Should work much better.

Comment 17 Bill Nottingham 2001-02-07 18:52:27 UTC
To clarify, use the second patch *instead* of the first one, not on top of it.

Comment 18 Bill Nottingham 2001-02-07 19:06:30 UTC
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.