From owner-freebsd-stable@FreeBSD.ORG Mon Dec 6 01:11:30 2004 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 045FD16A4D3 for ; Mon, 6 Dec 2004 01:11:30 +0000 (GMT) Received: from cain.gsoft.com.au (cain.gsoft.com.au [203.31.81.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id D16B043D4C for ; Mon, 6 Dec 2004 01:11:26 +0000 (GMT) (envelope-from doconnor@gsoft.com.au) Received: from inchoate.gsoft.com.au (localhost [127.0.0.1]) (authenticated bits=0) by cain.gsoft.com.au (8.12.11/8.12.10) with ESMTP id iB61BM5M002727; Mon, 6 Dec 2004 11:41:23 +1030 (CST) (envelope-from doconnor@gsoft.com.au) From: "Daniel O'Connor" To: freebsd-stable@freebsd.org Date: Mon, 6 Dec 2004 11:41:21 +1030 User-Agent: KMail/1.7.1 References: <41B32A1F.9000205@inode.at> In-Reply-To: <41B32A1F.9000205@inode.at> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1426991.g4uAuCQpQo"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200412061141.21490.doconnor@gsoft.com.au> X-Spam-Score: -5.4 () IN_REP_TO,PGP_SIGNATURE_2,QUOTED_EMAIL_TEXT,REFERENCES,SPAM_PHRASE_02_03,USER_AGENT,USER_AGENT_KMAIL X-Scanned-By: MIMEDefang 2.16 (www . roaringpenguin . com / mimedefang) cc: Hannes Mayer Subject: Re: Parallel Port Interrupt Handler in Kernel Module X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Dec 2004 01:11:30 -0000 --nextPart1426991.g4uAuCQpQo Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Mon, 6 Dec 2004 02:02, Hannes Mayer wrote: > I'm trying to capture the parallel port interrupt in a kernel module. > First I compiled the "skeleton" from: > http://freebsd.active-venture.com/arch-handbook/driverbasics-kld.html > and it works well. > > Then I googled on how to setup the interrupt handler, also looked at > the device driver sources of the parallel port driver and I found > that BUS_SETUP_INTR is used to setup the handler. I would suggest looking at existing drivers, there's plenty of working exam= ple=20 code 8-) In FreeBSD there is a parallel port abstraction called ppbus (man 4 ppbus)= =20 which allows different drivers to access the parallel port. Examples of cod= e=20 that uses ppbus are lpt, vpo, ppi, pps. I would say the ppi driver is probably a good place to start looking as it'= s=20 just a "geek port", and hence isn't very complex. I just kludged up a version of ppi that you can build outside the tree and= =20 allows you to load and unload (although I haven't actually _tested_ it apar= t=20 from load and unload :) http://www.gsoft.com.au/~doconnor/pphack.tgz =2D-=20 Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C --nextPart1426991.g4uAuCQpQo Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQBBs7G55ZPcIHs/zowRAsGlAKCmI3XOnGu0dzkAr+h9b8xnjr5g9ACgkxPJ sRcITEOGrOzdvFc3JNELz40= =tYJC -----END PGP SIGNATURE----- --nextPart1426991.g4uAuCQpQo--