2003-07-18 16:06:41

by SA

[permalink] [raw]
Subject: Missing interrupts?



Dear LK,

I am testing a new device driver and have found that one one machine it does not receive any interrupts.
I am stumped by this problem and wonder if anyone had any advice before I start to take things apart blindly.

Machines test where everything worked: kernels 2.4.18-10 and 2.4.18-24.8.0 on athlon based PCs

Machine where interrupts failed to appear: kernel 2.4.18-3 on a pentium 4.

I register the interrupt on open with
err=request_irq(pi_stage.interrupt,pi_int_handler,SA_SHIRQ,PI_IRQ_ID,(void*)&pi_stage);

My handler looks like

static void pi_int_handler(int irq, void *dev_id,struct pt_regs *regs){
u32 event;
pi_stage.ints_all++;
event=pi_read_control(PI_STAGE_INTEVENTSET);
if(event & PI_STAGE_ALLINTS){
pi_write_control(PI_STAGE_INTEVENTCLEAR,event &PI_STAGE_ALLINTS);
if(event & PI_STAGE_INTGPIO3)
pi_stage.ints_io++;
if(event & PI_STAGE_GPINT){
pi_stage.ints_axis++;
tasklet_schedule(&pi_tasklet);
}
pi_stage.ints_board++;
}
}

On the dodgy machine I see the driver and card working fine except for the missing interrupts.
The variable pi_stage.ints_all is never incremented and /proc/interrupts never reports any interrupts.
On all machines the conditions that generate the interrupts do occur.

It looks like on this one machine that interrupts are never received by the system.

Is it possible that differences between the BIOSs on the machines could cause this?
(ie my card is init'd differently so on the bad machine the ints are never generated or
received).

Any suggestions?

Thanks SA