diff --git a/sys/powerpc/mpc85xx/pci_mpc85xx.c b/sys/powerpc/mpc85xx/pci_mpc85xx.c --- a/sys/powerpc/mpc85xx/pci_mpc85xx.c +++ b/sys/powerpc/mpc85xx/pci_mpc85xx.c @@ -138,7 +138,8 @@ #define DEVFN(b, s, f) ((b << 16) | (s << 8) | f) -#define FSL_NUM_MSIS 256 /* 8 registers of 32 bits (8 hardware IRQs) */ +#define FSL_NUM_MSIS 256 /* 8 registers of 32 bits (8 hardware IRQs) */ +#define PCI_SLOT_FIRST 0x1 /* used to be 0x11 but qemu-ppce500 starts from 0x1 */ struct fsl_pcib_softc { struct ofw_pci_softc pci_sc; @@ -552,7 +553,8 @@ struct fsl_pcib_softc *sc = device_get_softc(dev); u_int devfn; - if (bus == sc->sc_busnr && !sc->sc_pcie && slot < 10) + if (bus == sc->sc_busnr && !sc->sc_pcie && + slot < PCI_SLOT_FIRST) return (~0); devfn = DEVFN(bus, slot, func); @@ -565,7 +567,8 @@ { struct fsl_pcib_softc *sc = device_get_softc(dev); - if (bus == sc->sc_busnr && !sc->sc_pcie && slot < 10) + if (bus == sc->sc_busnr && !sc->sc_pcie && + slot < PCI_SLOT_FIRST) return; fsl_pcib_cfgwrite(sc, bus, slot, func, reg, val, bytes); }