[lkml]   [2002]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRE: Interrupt trouble due to IRQ router VIA?
Thanks for your response.  I have tried other methods for sleeping to avoid
the race condition you are speaking of, but have not had any luck. At this
point, I am using the wait_event_interruptible, but this routine never
returns - I must Cntrl C to stop my test program. So now, the driver looks
something like this:

In routine called from ioctl:

/* a global, declared static int */
RcvIntr = 0;

/* cause H/W to interrupt */
writel(Data, HardwareAddress);
wait_event_interruptible(RcvIntrrcvQ, RcvIntr);


ResetReceiverInterrupt(pslState); /* clear the board's interrupt */
RcvIntr = 1;

Since I never get into my ISR, I added some [nasty] kernel hacks in
/arch/i386/kernel/irq.c to see if the O/S ever hears of the interrupt. In a

Global (after the #includes):
static unsigned myIRQ = 0;

In request_irq:

if (!action)
return = -ENOMEM;

+ if (strcmp(devname,"pslengrave") == 0)
+ {
+ myIRQ = irq;
+ printk(KERN_INFO "KJF: monitor pslengrave IRQ\n");
+ }

action->handler = handler;

In do_IRQ:


+ if ((myIRQ !=0) && (irq == myIRQ)) printk (KERN_INFO "KJF: Get spin lock
for IRQ %d\n", irq);

+ if ((myIRQ != 0) && (irq == myIRQ)) printk (KERN_INFO "KJF: Calling ack
handler for IRQ %d\n", irq);

desc->handler ->ack(irq);

Told you it was nasty! Note that my driver requests the IRQ (as specified
in the pci_dev structure) as sharable. However,in the current
configuration, no other device is using this IRQ. The request_irq routine
completes successfully and displays my message, but no sign of myIRQ in the
do_IRQ routine.

I appreciate any advice on how to solve this. I am also open to doing any
testing that may be necessary to determine why the OS never hears of the
interrupt. Once our logic analyzer is freed up, I can verify that the board
is interrupting . . . although we have been that route before when I was
testing in my original developement system. The device was interrupting
fine . . .

Thanks in advance for your help!


-----Original Message-----
[]On Behalf Of Alan Cox
Sent: Wednesday, July 31, 2002 8:35 PM
To: Kathy Frazier
Subject: Re: Interrupt trouble due to IRQ router VIA?

On Wed, 2002-07-31 at 21:15, Kathy Frazier wrote:
> another system. In this system, the driver times out on the
> interruptible_sleep_on_timeout waiting for the interrupt. One thing that

There is a classic kernel programming error which goes something like

foo->ready = 1;

while(!foo->ready && !signal_pending(current))


What happens then is this

foo->ready = 0 - true
signal pending = 0 - ok

wake up


Waits forever

It could be your timings have changed so such a bug now shows up

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:22    [W:0.076 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site