Subject: Re: explanation of PCI cardbus bridge code...
To: Jason Thorpe <thorpej@shagadelic.org>
From: Garrett D'Amore <garrett_damore@tadpole.com>
List: tech-kern
Date: 02/20/2006 15:10:54
Jason Thorpe wrote:
>
> On Feb 20, 2006, at 7:54 AM, Garrett D'Amore wrote:
>
>> 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 would like to get rid of pa_intrline completely.  Its function is
> completely superseded by pci_intr_map().

Yes.  Although I think having it there might help pci_intr_map() figure
out what BIOS did.  (I.e. it is a way to pass stuff from pci_configure
to pci_intr_map.  :-)  So in otherwords treat it as a read-only initial
state of the PCI configuration registers. :-)

    -- Garrett



-- 
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