From owner-freebsd-hackers@FreeBSD.ORG Sun Sep 5 02:39:50 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id B141E16A4CE for ; Sun, 5 Sep 2004 02:39:50 +0000 (GMT) Received: from ds.netgate.net (ds.netgate.net [205.214.170.232]) by mx1.FreeBSD.org (Postfix) with ESMTP id 861C743D45 for ; Sun, 5 Sep 2004 02:39:50 +0000 (GMT) (envelope-from ctodd@chrismiller.com) Received: (qmail 3168 invoked from network); 5 Sep 2004 02:39:50 -0000 Received: from vp4.netgate.net (ibrew@205.214.170.248) by ds.netgate.net with SMTP; 5 Sep 2004 02:39:50 -0000 Date: Sat, 4 Sep 2004 19:39:50 -0700 (PDT) From: ctodd@chrismiller.com X-X-Sender: ibrew@vp4.netgate.net To: freebsd-hackers@freebsd.org Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: KLD and USB driver X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Sep 2004 02:39:50 -0000 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