Yenta and IRQ0

David Hinds dhinds at sonic.net
Wed Aug 11 16:56:22 EDT 2004


On Wed, Aug 11, 2004 at 04:17:38PM +0100, David Woodhouse wrote:
> On Tue, 2004-08-10 at 17:30 +0100, Russell King wrote:
> > Hi,
> > 
> > Is there any reason that we're not just out-right refusing to allow
> > yenta to initialise if we find that we don't have the PCI interrupt
> > assigned by the PCI subsystem/BIOS ?
> 
> I have difficulty understanding the relationship between the above
> sentence and the subject. Zero is a perfectly valid IRQ number and I
> have boxes which share IRQ 0 between all the PCI slots.

Well, I guess that begs the question, how do we correctly test whether
a device was assigned an interrupt, if 0 is a perfectly valid value?
On at least some architectures, the PCI subsystem explicitly uses 0 to
indicate failure to assign an interrupt.

drivers/pci/setup-irq.c pdev_fixup_irq():

         irq = (*map_irq)(dev, slot, pin);
         if (irq == -1)
                 irq = 0;

arch/i386/pci/irq.c pcibios_lookup_irq():

         if (!irq) {
                 DBG(" ... failed\n");
                 if (newirq && mask == (1 << newirq)) {
                         msg = "Guessed";
                         irq = newirq;
                 } else
                         return 0;
         }

arch/i386/pci/irq.c pcibios_fixup_irqs():
   
         if (dev->irq >= 16) {
                 DBG("%s: ignoring bogus IRQ %d\n", pci_name(dev), dev->irq);
                 dev->irq = 0;
         }




More information about the linux-pcmcia mailing list