Re: PCI irq routing..

From: Linus Torvalds (torvalds@transmeta.com)
Date: Mon Dec 11 2000 - 20:15:22 EST


Martin,
 I finally got access to a machine that truly has multiple PCI buses and
bridges in between them, and at least for that machine the x86 IRQ lookup
does not work at all.

The problem seems to be the "pci_get_interrupt_pin()" call. We should not
do that. The pirq table has the unmodified device information - and when
we try to swizzle the pins and find the bridge that the device is behind,
we're trying to be way too clever.

Instead of doing

        pin = pci_get_interrupt_pin(dev, &d);
        if (pin < 0) {
                DBG(" -> no interrupt pin\n");
                return 0;
        }

I think we should be doing:

        u8 pin;
        pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
        if (!pin) {
                DBG(" -> no interrupt pin\n");
                return 0;
        }
        pin--;
        d = dev;

and be done with it. No swizzling, no nothing.

On the machine I just saw, this would have given the right end result.

On machines with just one bus, we'd never see the difference.

Comments?

                Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Dec 15 2000 - 21:00:23 EST