Kernel module problems/questions

From: Barry Bouwsma (freebsd-misuser_at_remove-NOSPAM-to-reply.NOSPAM.dyndns.dk)
Date: 09/24/03

  • Next message: Barry Bouwsma: "Re: Machine wedges solid after one serial-port source-lineaddition..."
    Date: Wed, 24 Sep 2003 18:33:49 +0200 (CEST)
    To: FreeBSD Hacking Group <hackers@freebsd.org>
    
    

    [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

    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"


  • Next message: Barry Bouwsma: "Re: Machine wedges solid after one serial-port source-lineaddition..."

    Relevant Pages

    • Re: unloading ums and usb
      ... But when ums had been loaded and is unloaded attempting to ... > unload usb fails. ... for Genesis Software - http://www.gsoft.com.au ...
      (freebsd-current)
    • Re: USB HD SCSI ID Problem
      ... > Apologies if this is not the right place. ... But I'll also point out that if you unload the usb-storage ... module (after removing the USB drive), ...
      (comp.os.linux.hardware)
    • Re: HEADS UP: Release schedule for 2006
      ... > If you unload the drivers, you should be to lower levels. ... I do plan on building a kernel without USB and see if unloading is ... If I start usbd by hand the system starts spending time in C2. ...
      (freebsd-stable)
    • Re: Process in D state with USB and swsuspsp
      ... > Rob Landley wrote: ... > Most of us that use swsusp regularly have our pre-suspend script unload usb ... > before suspend to prevent exactly this sort of behaviour. ... > I also unload PCMCIA. ...
      (Linux-Kernel)
    • Re: usbcore module cant unload after swsusp
      ... On Thu, 2003-08-07 at 00:23, Greg KH wrote: ... >> with usb compiled in as a module. ... >> When kernel loads for the first time everything works fine, ... > Unload the usb modules before suspending. ...
      (Linux-Kernel)