Subject: explanation of PCI cardbus bridge code...
To: None <tech-kern@NetBSD.org>
From: Garrett D'Amore <garrett_damore@tadpole.com>
List: tech-kern
Date: 02/20/2006 07:54:50
Can anyone explain the following code:

#if NIOAPIC > 0
    printf("%s: using ioapic for interrupt\n", sc->sc_dev.dv_xname);
#else
    if ((0 == pa->pa_intrline) || (255 == pa->pa_intrline)) {
            printf("%s: NOT USED because of unconfigured interrupt\n",
            sc->sc_dev.dv_xname);
        return;
    }
#endif

This breaks pccb on sparc, and as far as I can tell, pa->pa_intrline is
not actually used anywhere in the code.  (The IRQ register in PCI
configuration space is "machine dependent", and on SPARC isn't used at all.)

I think the above code is pretty PC-specific.  Can it be removed, or
#ifdef i386'd?

-- 
Garrett D'Amore, Principal Software Engineer
Tadpole Computer / Computing Technologies Division,
General Dynamics C4 Systems
http://www.tadpolecomputer.com/
Phone: 951 325-2134  Fax: 951 325-2191