Kernel module problems/questions

Barry Bouwsma freebsd-misuser at remove-NOSPAM-to-reply.NOSPAM.dyndns.dk
Wed Sep 24 09:34:55 PDT 2003


[You know the drill: drop my hostname from the above IPv6-only address to get
 an IPv4-capable address; drop me entirely to avoid bounces and I'll catch the
 archives before your mail might reach me if it doesn't bounce]


Some stupid kernel module questions.  Kernel source from a few days ago,
RELENG_4.

First, why would USB-related modules whose source explicitly declares a DEPEND
on the usb.ko module, fail to auto-load the usb module when they're kldload'ed?
They fail with various undefined symbol errors, and there's no trace of any
attempt to load the usb module.

Second, why do some USB devices declare a module dependency on usb, while
others (say, umass) do not?  Ignoring that the usb auto-load fails for now.

Third, if I load the usb.ko module by hand, everything works, except that I
can't unload the usb.ko module.  The error is `Device not configured.'  To
make this a question, I'll add:  Why is this?

Fourth, after boot, if I load, say, sbp.ko, it auto-loads firewire.ko, and
attempts to unload firewire are denied so long as sbp.ko remains loaded.
But if at boot, I've mangled the loader.conf to load sbp.ko, which then
auto-loads firewire.ko, I *am* able to unload firewire.ko later by hand.
Then unloading sbp.ko promptly results in a kernel panic.  So, why can I
unload modules auto-loaded at boot, when I'm denied unloading the same
modules auto-loaded after boot?  The desired behaviour would be *not* to be
able to unload any auto-loaded modules, regardless.

Fifth, I've run out of questions for now.  Tune in again later.


Thanks,
Barry Bouwsma



More information about the freebsd-hackers mailing list