Subject: Re: 2 PCI devices behind PCI bridge on Yosemite board.

From: Scott Wood <[email-masked]>
Date: Thu, 30 Nov 2006 14:07:50 -0600

Leonid wrote:
> Problem starts when I work with Dreamchip. Interrupt arrives from it and
> kernel doesn't know what to do with this interrupt and it gets disabled.
> Looks like interrupt doesn't get acknowledged properly.
> 
> I tried to register Dreamchip PCI device by 2 ways:
> 
> 1) I request interrupt and provide as interrupt handler empty function:
> 
> irqreturn_t snd_dream_interrupt(int irq, void *dev_id, struct pt_regs
> *regs)
> {
> 	return IRQ_NONE;
> }

You didn't deal with the source of the interrupt.  Since it's apparently 
level-triggered, the interrupt just comes right back.

> 2) Because I don't need interrupt from Dreamchip anyway, I tried don't
> request interrupt upon Dreamchip PCI driver registration. Result was the
> same though kernel output different:

Not requesting the IRQ doesn't stop the device from asserting it.

> Any ideas what I have done wrong? Can I just tell to the bridge don't
> interrupt CPU if Dreamchip is interrupting?

No, because both devices share the same physical IRQ line.  The PIC 
can't tell which device is asserting it.  You need to either provide a 
real IRQ handler for the Dreamchip, or tell the Dreamchip itself to mask 
the IRQ.

-Scott