From owner-freebsd-hackers Thu Oct 31 07:41:22 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id HAA15640 for hackers-outgoing; Thu, 31 Oct 1996 07:41:22 -0800 (PST) Received: from renoir.cftnet.com (renoir.cftnet.com [163.125.1.2]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id HAA15631 for ; Thu, 31 Oct 1996 07:41:18 -0800 (PST) Received: (gambert@localhost) by renoir.cftnet.com (8.8.0/8.6.4) id KAA18728; Thu, 31 Oct 1996 10:45:45 -0500 (EST) Date: Thu, 31 Oct 1996 10:45:45 -0500 (EST) From: "Allen W. Gambert" X-Sender: gambert@renoir.cftnet.com To: hackers@freebsd.org Subject: problems with device driver Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk I'm writing a device driver for a prototype async board. The device driver i've written compiles into the kernel fine. When the system boots with the newly built kernel, the kernel entry routines mbprobe and mbattach get called and the initialization of the device driver structures correctly happens. I can see this because i've put a bunch of printf statements all over the place in every routine that is called. I've checked the majors.i386 file and decided to use major device number 77, the last free entry in that file. After creating the device nodes I use kermit to try to open the device. I keep getting 'Sorry, can't open connection: /dev/mb0: Device not configured'. I believe this is caused by the open routine returning 'ENXIO'. The problem is the kernel is not calling my open routine but instead some other open routine. I know its not calling my open routine because its not printing out the printf's i've placed at the beginning of 'mbopen'. My question is what can I do to determine why my open routine is not being called but instead some other open routine is being called? I must be over looking something, but I just cant seem to figure out what. If someone can point me in the right direction I would greatly appreciate it. Also. I was hoping to make this device driver an lkm instead of hard coding it into the kernel. The only problem is I cant seem to find any documentation on lkm other than the man pages. Does anyone know where I might be able to find some documentation on lkm? Thanks for you help. Allen