Re: Problems with missing interrupts (probably my fault)

Harald =?ISO-8859-1?Q?Nordg=E5rd-Hansen?= (hnh@bukharin.hiof.no)
27 Jul 1999 09:07:48 +0200


Tim Waugh <tim@cyberelk.demon.co.uk> writes:
> Since you're getting interrupts at all, presumably it isn't just a
> question of bit 4 of CTR being low and disabling interrupts from the port?
> port->ops->enable_irq (port) will set it.

This was of course correct, when enabling the irq everything started
working correctly. Why any of them was delivered, I don't know, might
be something wrong in the underlying layers?

> By looking at the comments, it looks like you're only getting about 500
> interrupts a second, is that right? I wonder how you're timing that.

Actually, I'm was getting about 630 interrupts per half second.
Basically I set a flag that tells the interrupt handler just to
increment a counter and return. Then I set that counter to 0, set the
flag and do a schedule_timeout for half a second in the main driver
thread, turn off the flag and read out the variable.

> You could have a wait_queue that the interrupt service routine wakes up,
> and then sleep on that in the irq-driven read routine instead of just
> doing a schedule. It shouldn't make a difference though..

That part actually worked nicely all the time. The problem was the
interrupt servicing routine being called all to seldom, which your tip
fixed. Thanks.

-Harald

-- 
Harald Nordgård-Hansen,  <><  http://bukharin.hiof.no/~hnh/  <>< Phone/Fax:
Østfold College, School of Computer Sciences, Norway <>< +47 6910 4033/4002

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/