Re: action on IRQs outside the kernel

becka@rz.uni-duesseldorf.de
Wed, 10 Mar 1999 01:26:30 +0100 (MET)

Hi !

> I have a question on Linux' IRQ handling. Is there a posibility
> to recognize an IRQ by an user process.

It is in theory possible, but I wouldn't recommend it.

> I wrote a driver for a scanner with controller card that handles data
> transmision via IRQ. So I wrote a device driver for the linux kernel.

That's what I'd do (have done) either.

> This is not the finest way because my sane backend depends on this
> special kernel driver.

Well - you might want to think about having a look at LHII which was
designed for the old handscanner devices (available in the logiscan
package, that should be on sunsite and tsx), and the SANE API (which you
probably know well), and we can try to make LHII-2 aka SANE-II (hmm -
I like the abigous II :-) for such cases ...

> Is it possible to get an IRQ from inside of my backend?

First of all: There is _no_ stock kernel feature to do this.
The problem is, that you need to clear the interrupt condition, and this
requires knowing the issueing card well enough, inside the kernel.

So basically you'd still need at least a minimal card-specific driver.
This driver could then of course wake up a process or send a signal to
it, but I don't see much gain over some nice driver.

Usermode has lots of ugly issues for these things like pages being swapped
out (the handler ...), the process not being scheduled for too long, ...

CU, ANdy

-- 
= Andreas Beck                    |  Email :  <andreas.beck@ggi-project.org> =

--
Source code, list archive, and docs: http://www.mostang.com/sane/
To unsubscribe: echo unsubscribe sane-devel | mail majordomo@mostang.com