From owner-freebsd-hackers Sat Aug 12 6: 2:16 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp10.atl.mindspring.net (smtp10.atl.mindspring.net [207.69.200.246]) by hub.freebsd.org (Postfix) with ESMTP id 175CE37BD64 for ; Sat, 12 Aug 2000 06:02:13 -0700 (PDT) (envelope-from vns@mindspring.com) Received: from jupiter.delta.ny.us (nyf-ny7-11.ix.netcom.com [198.211.17.139]) by smtp10.atl.mindspring.net (8.9.3/8.8.5) with ESMTP id JAA11418; Sat, 12 Aug 2000 09:02:10 -0400 (EDT) Received: (from vsilyaev@localhost) by jupiter.delta.ny.us (8.9.3/8.9.3) id JAA00442; Sat, 12 Aug 2000 09:02:02 -0400 (EDT) (envelope-from vns) Date: Sat, 12 Aug 2000 09:02:02 -0400 (EDT) From: "Vladimir N.Silyaev" Message-Id: <200008121302.JAA00442@jupiter.delta.ny.us> To: dbutter@wireless.net Cc: freebsd-hackers@freebsd.org Subject: Re: Need help with driver....(long) In-Reply-To: <39953196.1103F555@wireless.net> References: <200008112235.PAA00839@mass.osd.bsdi.com> <39953196.1103F555@wireless.net> Reply-To: vns@delta.odessa.ua Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In muc.lists.freebsd.hackers, you wrote: >One thing I did try, was to write a very simple program to open the >device You can (should) just use echo -n >device_file, that's it. BTW for testing purpose it doesn't required to put now in the /dev directory, /dev doesn't mean nothing magical. >(now that I have correctly created the node in /dev) and I >inserted a printf in my ixj_open() in the driver to indicate that it >entered the open function...and this does seem to work. If open >succeeds, can I safely conclude that I'm doing things right? That's just means that you are able to find your card in ISA bus. >On another note, I also compiled my skeleton driver as a module and it >loads ok, but if I try to use my little program to open the device, it >fails. I then tried inserting printf's in the probe and attach >functions, but when I load the module I still don't get any output. It >doesn't seem the driver probes or attaches if I load it as a module. How you are compiled your driver as a module. You should to use Makefile like that: -=-=-=-=-=-- NOMAN= YES KMOD= ixj SRCS= ixj.c device_if.h bus_if.h isa_if.h .include -=-=-=-=-=-- What FreeBSD version you are using now? -- Vladimir P.S. The line sc->dev = make_dev(&ixj_cdevsw, 0, UID_ROOT, GID_WHEEL, 0666, "phone0"); better to rewrite as int unit = device_get_unit(dev); ... "ilx%d", unit), and after that to check the value of sc->dev. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message