Re: Problems with device driver interrupts
- From: John <jvasquez@xxxxxxxxxxxx>
- Date: Fri, 15 Feb 2008 10:44:48 -0800
On 15 Feb 2008 10:26:57 GMT, andrew@xxxxxxxxxxxxxxxxxxxx (Andrew
Gabriel) wrote:
You load your driver (the firmware part threw me - it looked like you
were expecting _that_ to cause an interrupt) and your interrupt
routine gets called when you didn't expect an interrupt. The system
gets funky.
In your interupt code, are you returning DDI_INTR_UNCLAIMED after
verifying that it is _not_ your board interrupting, and returning
DDI_INTR_CLAIMED when you detect (by register read or ??) that your
board _is_ interrupting.
As you know, PCI interrupts can be shared. AFAIK, all interrupt
routines on a shared interrupt get called by the kernel interrupt
code when an int occurs on that line. I'm _guessing_ that the
kernel stops calling the int handler chain at the first "CLAIMED"
return. If it wasn't you, and you return CLAIMED and your code
gets called before that actually interrupting device, that device
doesn't know to reset its int, and the interrupt handler chain gets
called again...and again...
All interrupt handlers for that interrupt will be called -- there
could be more than one device interrupting. If you don't return
CLAIMED, then an error about unserviced interrupts will eventually
be generated. If interrupts on a line are not being serviced by any
driver repeatedly, I think some action is taken to mask them out
(maybe different on different platforms).
If your device is generating an interrupt and you aren't doing
whatever it requires to satisfy/cancel that interrupt, then the
system may go into an interrupt loop, repeatedly representing an
interrupt which you aren't clearing.
My device is not generating an interrupt. I understand that if my
device is generating an interrupt and I don't CLAIM the interrupt, the
system will go into an interrupt loop. Windows OS does the same thing.
Probably most OSs.
I'm on disability and working at home. I might have to wait until I
return to work and hook up a bus and logic analyzer to really see if
the device is generating an interrupt. I don't think it is. The device
works ok in Windows.
.
- References:
- Problems with device driver interrupts
- From: John
- Re: Problems with device driver interrupts
- From: Andrew Gabriel
- Re: Problems with device driver interrupts
- From: John
- Re: Problems with device driver interrupts
- From: Bill Waddington
- Re: Problems with device driver interrupts
- From: Bill Waddington
- Re: Problems with device driver interrupts
- From: Andrew Gabriel
- Problems with device driver interrupts
- Prev by Date: Re: Static route ignoring mtu setting
- Next by Date: Re: Windows and NFS.
- Previous by thread: Re: Problems with device driver interrupts
- Next by thread: Re: Problems with device driver interrupts
- Index(es):
Relevant Pages
|