Index: amd64/pci/pci_cfgreg.c =================================================================== RCS file: /usr/cvs/src/sys/amd64/pci/pci_cfgreg.c,v retrieving revision 1.112 diff -u -r1.112 pci_cfgreg.c --- amd64/pci/pci_cfgreg.c 10 Sep 2008 18:06:08 -0000 1.112 +++ amd64/pci/pci_cfgreg.c 11 Sep 2008 15:33:37 -0000 @@ -114,11 +114,17 @@ static uint32_t pci_docfgregread(int bus, int slot, int func, int reg, int bytes) { + uint32_t val1, val2; if (cfgmech == CFGMECH_PCIE && - (bus != 0 || !(1 << slot & pcie_badslots))) - return (pciereg_cfgread(bus, slot, func, reg, bytes)); - else + (bus != 0 || !(1 << slot & pcie_badslots))) { + val1 = pciereg_cfgread(bus, slot, func, reg, bytes); + val2 = pcireg_cfgread(bus, slot, func, reg, bytes); + if (val1 != val2) + panic("pci_cfgread(%d:%d:%d, %d, %d) => %#x, %#x", + bus, slot, func, reg, bytes, val1, val2); + return (val1); + } else return (pcireg_cfgread(bus, slot, func, reg, bytes)); } Index: i386/pci/pci_cfgreg.c =================================================================== RCS file: /usr/cvs/src/sys/i386/pci/pci_cfgreg.c,v retrieving revision 1.131 diff -u -r1.131 pci_cfgreg.c --- i386/pci/pci_cfgreg.c 10 Sep 2008 18:06:08 -0000 1.131 +++ i386/pci/pci_cfgreg.c 11 Sep 2008 15:34:48 -0000 @@ -201,11 +201,17 @@ static uint32_t pci_docfgregread(int bus, int slot, int func, int reg, int bytes) { + uint32_t val1, val2; if (cfgmech == CFGMECH_PCIE && - (bus != 0 || !(1 << slot & pcie_badslots))) - return (pciereg_cfgread(bus, slot, func, reg, bytes)); - else + (bus != 0 || !(1 << slot & pcie_badslots))) { + val1 = pciereg_cfgread(bus, slot, func, reg, bytes); + val2 = pcireg_cfgread(bus, slot, func, reg, bytes); + if (val1 != val2) + panic("pci_cfgread(%d:%d:%d, %d, %d) => %#x, %#x", + bus, slot, func, reg, bytes, val1, val2); + return (val1); + } else return (pcireg_cfgread(bus, slot, func, reg, bytes)); }