*BSD News Article 62155


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!bunyip.cc.uq.oz.au!munnari.OZ.AU!spool.mu.edu!pravda.aa.msen.com!nntp.coast.net!news.kei.com!newsfeed.internetmci.com!xmission!news.cc.utah.edu!park.uvsc.edu!usenet
From: Terry Lambert <terry@lambert.org>
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: FreeBSD Device Drvr problem
Date: 24 Feb 1996 20:29:57 GMT
Organization: Utah Valley State College, Orem, Utah
Lines: 28
Message-ID: <4gnsg5$i5h@park.uvsc.edu>
References: <4gl405$1pts@olympus.bzn.vlt.eds.com>
NNTP-Posting-Host: hecate.artisoft.com

carlson@olympus.bzn.vlt.eds.com (Brent Carlson) wrote:
>
> We've written a custom ISA device driver for a product we manufacturer.
> The driver works great when compiled into the kernel (on 2.0.5 & 2.1.0).
> The driver uses ioctl calls to write data to the board and there is an
> intr handler.  We've recently experimented with loadable kernel modules
> and the driver again loads/seems normal.  The problem is all the ioctl
> calls timeout (using a select statement).  It seems the driver isn't
> getting interrupts from the board.  Any suggestions?
> 
> The driver code is exactly the same when compiled with the kernel
> or without.  The lkm code has an additional C file for the load/unload
> functions.

You must explicitly grab the interrupt during the initalization,
since the "probe" and "attach" code will not be run by the boot
code (since the machine is already booted).

I don't know where to point you for examples of this off the top
of my head; if you were able to build a driver, then you should
be able to find the necessary functions fairly easily.


                                        Terry Lambert
                                        terry@cs.weber.edu
---
Any opinions in this posting are my own and not those of my present
or previous employers.