Index: src/sys/dev/pci/pci.c =================================================================== RCS file: /home/ncvs/src/sys/dev/pci/pci.c,v retrieving revision 1.292.2.6 diff -u -r1.292.2.6 pci.c --- src/sys/dev/pci/pci.c 30 Jan 2006 18:42:10 -0000 1.292.2.6 +++ src/sys/dev/pci/pci.c 31 Jan 2006 10:57:32 -0000 @@ -428,7 +428,7 @@ ptrptr = PCIR_CAP_PTR; break; case 2: - ptrptr = 0x14; + ptrptr = PCIR_CAP_PTR_2; break; default: return; /* no extended capabilities support */ @@ -447,10 +447,10 @@ } /* Find the next entry */ ptr = nextptr; - nextptr = REG(ptr + 1, 1); + nextptr = REG(ptr + PCICAP_NEXTPTR, 1); /* Process this entry */ - switch (REG(ptr, 1)) { + switch (REG(ptr + PCICAP_ID, 1)) { case PCIY_PMG: /* PCI power management */ if (cfg->pp.pp_cap == 0) { cfg->pp.pp_cap = REG(ptr + PCIR_POWER_CAP, 2); @@ -1040,7 +1040,8 @@ } if (cfg->intpin > 0 && PCI_INTERRUPT_VALID(cfg->intline)) { -#ifdef __PCI_REROUTE_INTERRUPT +#if defined(__ia64__) || defined(__i386__) || defined(__amd64__) || \ + defined(__arm__) || defined(__alpha__) /* * Try to re-route interrupts. Sometimes the BIOS or * firmware may leave bogus values in these registers.