Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 4 Sep 2004 19:39:50 -0700 (PDT)
From:      ctodd@chrismiller.com
To:        freebsd-hackers@freebsd.org
Subject:   KLD and USB driver
Message-ID:  <Pine.BSI.4.58L.0409041924100.24206@vp4.netgate.net>

next in thread | raw e-mail | index | archive | help

I'm working on a usb device driver I've derived from existing drivers in
sys/dev/usb (4.10-RELEASE).

I can successfully load and unload the module, but the usb subsystem does
not appear to see the driver. However if I compile my driver in the
kernel, the usb sub system uses the driver correctly. Unfortunately this
is making it time consuming to test changes to my driver code as I have to
compile the kernel each time.

I haven't see this used in the existing usb drivers code, but I tried
using the "KLD Skeleton" from the FreeBSD Architecture Handbook.
Although I see the uprintf output at the terminal when load/unloading the
module, the usb subsystem does not use my driver. Like the existing usb
drivers, I'm using USB_DECLARE_DRIVER and DRIVER_MODULE statements.

Is the KLD DECLARE_MODULE code really necessary for this driver (doesn't
USB_DECLARE_DRIVER make the driver available already)? How can I determine
why the driver works when compiled in the kernel, but not when dynamically
loaded? I'm able to load/unload the uhid and ugen drivers and they work as
expected.

Any wisdom in this area would be much appreciated.

Chris



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSI.4.58L.0409041924100.24206>