From owner-freebsd-hackers Sun Aug 13 5:11:39 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from wireless.net (wireless.net [207.137.156.159]) by hub.freebsd.org (Postfix) with ESMTP id 38D4137B7FF for ; Sun, 13 Aug 2000 05:11:36 -0700 (PDT) (envelope-from dbutter@wireless.net) Received: from db.wireless.net (db.wireless.net [209.75.70.101]) by wireless.net (8.9.3/8.9.3) with ESMTP id FAA04941 for ; Sun, 13 Aug 2000 05:11:33 -0700 (PDT) Received: from wireless.net (dbm.wireless.net [192.168.0.2]) by db.wireless.net (8.9.3/8.9.3) with ESMTP id FAA43070 for ; Sun, 13 Aug 2000 05:04:12 -0700 (PDT) (envelope-from dbutter@wireless.net) Message-ID: <39969072.EED2B8F6@wireless.net> Date: Sun, 13 Aug 2000 05:11:30 -0700 From: Devin Butterfield X-Mailer: Mozilla 4.73 [en] (X11; I; Linux 2.2.12 i386) X-Accept-Language: en MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Subject: "Unknown" driver gobbles resources?? References: <200008112235.PAA00839@mass.osd.bsdi.com> <39953196.1103F555@wireless.net> <200008121302.JAA00442@jupiter.delta.ny.us> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi all, In the process of learning device driver writing, I have written a simple skeleton driver for an isa PnP card I have. Thanks to some kind folks on the list I have ironed out most of my confusion. However I've run into a strange problem that has me stumped. Although this driver works (successfully probes, attaches, and gets it's needed io resources) when compiled into the kernel, if I compile it as a loadable module it fails to get it's io resources when loaded, and if I try to then unload it, the kernel panics (as the driver trys to release resources that were never allocated). I found that if I remove the "unknown" driver in isa_common.c with #if 0...#endif, my driver will load just fine! So my question is this: Do I need to do anything special to recover the resources from the unknown driver so that during loading *my* module can get the resources it needs?? Do I need to add something to my identify, probe, or attach routines to make this work right? Thanks again. -- Regards, Devin. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message