From owner-freebsd-hackers Mon Oct 27 10:44:28 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id KAA13669 for hackers-outgoing; Mon, 27 Oct 1997 10:44:28 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from smtp03.primenet.com (smtp03.primenet.com [206.165.5.84]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id KAA13609 for ; Mon, 27 Oct 1997 10:44:14 -0800 (PST) (envelope-from tlambert@usr04.primenet.com) Received: (from daemon@localhost) by smtp03.primenet.com (8.8.7/8.8.7) id LAA15470; Mon, 27 Oct 1997 11:43:57 -0700 (MST) Received: from usr04.primenet.com(206.165.6.204) via SMTP by smtp03.primenet.com, id smtpd015466; Mon Oct 27 11:43:55 1997 Received: (from tlambert@localhost) by usr04.primenet.com (8.8.5/8.8.5) id LAA24331; Mon, 27 Oct 1997 11:43:53 -0700 (MST) From: Terry Lambert Message-Id: <199710271843.LAA24331@usr04.primenet.com> Subject: Re: a question about LKM To: luigi@labinfo.iet.unipi.it (Luigi Rizzo) Date: Mon, 27 Oct 1997 18:43:53 +0000 (GMT) Cc: hackers@freebsd.org In-Reply-To: <199710270641.HAA03134@labinfo.iet.unipi.it> from "Luigi Rizzo" at Oct 27, 97 07:41:11 am X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-freebsd-hackers@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > I am looking at how ot make my audio driver an LKM. > > I have seen some examples of LKMs but none of them uses interrupts. > As a consequence, I am a bit unclear on what actions should be done > at load time (and especially, at unload time) so that interrupts > are properly delivered. For the attach part i can probably figure > it out -- just do the standard attach() action -- but what for the > detach ? Look at the PCCARD code (it has to detach things as well). The PCI stuff is probably best for the attach. In effect, you implement a "probe on load". This is somewhat dangerous for non-PnP ISA cards, BTW. The code in this area needs to be more orthoganal, IMO. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.