* debugging "irq 7: nobody cared" in my module
@ 2006-06-05 12:51 Thomas Andrews
2006-06-05 16:11 ` Thomas Andrews
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Andrews @ 2006-06-05 12:51 UTC (permalink / raw)
To: linux-kernel
Hi,
What can cause "irq x: nobody cared" ? On exit from my IRQ handler, I am
checking to make sure that there are no residual/pending unhandled
events on exit. Here is part of my handler:
irqreturn_t scx200_acb_irq(int irq_no, void *dev_id, struct pt_regs *regs)
{
struct scx200_acb_iface *iface = dev_id;
unsigned long flags;
spin_lock_irqsave(lock, flags);
if (inb(ACBST)) {
// tasklet_schedule(&iface->tasklet);
scx200_acb_machine(iface, inb(ACBST));
if (iface->state == state_idle) /* Finished */
wake_up_interruptible(&iface->acb_queue);
} else {
/* Should never get here */
printk("causeless IRQ!\n");
/* Reset the ACB to clear any pending IRQ */
outb((inb(ACBCTL2) & 0xfe), ACBCTL2);
outb((inb(ACBCTL2) | 0x01), ACBCTL2);
}
/* Check to see if some event was not handled */
if (inb(ACBST) & 0xBC)
printk("============== ACBST=%#x ===============\n",inb(ACBST));
spin_unlock_irqrestore(lock, flags);
return IRQ_RETVAL(0);
}
I've also had the problem when I move everything into a tasklet, and
just have a very short IRQ handler.
Many thanks,
Thomas
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: debugging "irq 7: nobody cared" in my module
2006-06-05 12:51 debugging "irq 7: nobody cared" in my module Thomas Andrews
@ 2006-06-05 16:11 ` Thomas Andrews
2006-06-05 16:47 ` Michael Buesch
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Andrews @ 2006-06-05 16:11 UTC (permalink / raw)
To: linux-kernel
On Mon, Jun 05, 2006 at 02:51:32PM +0200, Thomas Andrews wrote:
> What can cause "irq x: nobody cared" ? On exit from my IRQ handler, I am
> checking to make sure that there are no residual/pending unhandled
> events on exit. Here is part of my handler:
>
> irqreturn_t scx200_acb_irq(int irq_no, void *dev_id, struct pt_regs *regs)
> {
> struct scx200_acb_iface *iface = dev_id;
> unsigned long flags;
> spin_lock_irqsave(lock, flags);
> if (inb(ACBST)) {
> // tasklet_schedule(&iface->tasklet);
> scx200_acb_machine(iface, inb(ACBST));
> if (iface->state == state_idle) /* Finished */
> wake_up_interruptible(&iface->acb_queue);
> } else {
> /* Should never get here */
> printk("causeless IRQ!\n");
> /* Reset the ACB to clear any pending IRQ */
> outb((inb(ACBCTL2) & 0xfe), ACBCTL2);
> outb((inb(ACBCTL2) | 0x01), ACBCTL2);
> }
> /* Check to see if some event was not handled */
> if (inb(ACBST) & 0xBC)
> printk("============== ACBST=%#x ===============\n",inb(ACBST));
> spin_unlock_irqrestore(lock, flags);
> return IRQ_RETVAL(0);
> }
I've found the problem now. The last line is wrong - it should read:
return IRQ_RETVAL(IRQ_HANDLED);
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: debugging "irq 7: nobody cared" in my module
2006-06-05 16:11 ` Thomas Andrews
@ 2006-06-05 16:47 ` Michael Buesch
0 siblings, 0 replies; 3+ messages in thread
From: Michael Buesch @ 2006-06-05 16:47 UTC (permalink / raw)
To: Thomas Andrews; +Cc: linux-kernel
On Monday 05 June 2006 18:11, Thomas Andrews wrote:
> On Mon, Jun 05, 2006 at 02:51:32PM +0200, Thomas Andrews wrote:
>
> > What can cause "irq x: nobody cared" ? On exit from my IRQ handler, I am
> > checking to make sure that there are no residual/pending unhandled
> > events on exit. Here is part of my handler:
> >
> > irqreturn_t scx200_acb_irq(int irq_no, void *dev_id, struct pt_regs *regs)
> > {
> > struct scx200_acb_iface *iface = dev_id;
> > unsigned long flags;
> > spin_lock_irqsave(lock, flags);
> > if (inb(ACBST)) {
> > // tasklet_schedule(&iface->tasklet);
> > scx200_acb_machine(iface, inb(ACBST));
> > if (iface->state == state_idle) /* Finished */
> > wake_up_interruptible(&iface->acb_queue);
> > } else {
> > /* Should never get here */
> > printk("causeless IRQ!\n");
> > /* Reset the ACB to clear any pending IRQ */
> > outb((inb(ACBCTL2) & 0xfe), ACBCTL2);
> > outb((inb(ACBCTL2) | 0x01), ACBCTL2);
> > }
> > /* Check to see if some event was not handled */
> > if (inb(ACBST) & 0xBC)
> > printk("============== ACBST=%#x ===============\n",inb(ACBST));
> > spin_unlock_irqrestore(lock, flags);
> > return IRQ_RETVAL(0);
> > }
>
> I've found the problem now. The last line is wrong - it should read:
>
> return IRQ_RETVAL(IRQ_HANDLED);
No, either
return IRQ_HANDLED;
or
return IRQ_RETVAL(boolean);
You returned the boolean 0, which is "false".
--
Greetings Michael.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-06-05 16:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-05 12:51 debugging "irq 7: nobody cared" in my module Thomas Andrews
2006-06-05 16:11 ` Thomas Andrews
2006-06-05 16:47 ` Michael Buesch
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox