From f17dbad313a8ac75d7a216f25a4ae8b644642108 Mon Sep 17 00:00:00 2001 From: QiaoChong Date: Thu, 21 Feb 2019 19:21:28 +0800 Subject: [PATCH] pci: pmon not update first bridge bus PCI_PRIBUS_1, which is a dummy device. Change-Id: I5d62d461d612728423d06ccfd28c7558258463a7 Signed-off-by: QiaoChong --- sys/dev/pci/pciconf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/pci/pciconf.c b/sys/dev/pci/pciconf.c index 088cf99d..83c4d6c2 100644 --- a/sys/dev/pci/pciconf.c +++ b/sys/dev/pci/pciconf.c @@ -568,7 +568,8 @@ _pci_query_dev_func (struct pci_device *dev, pcitag_t tag, int initialise) tmp = _pci_conf_read(pcidev->pa.pa_tag, PCI_PRIBUS_1); tmp &= 0xff00ffff; tmp |= pd->bridge.secbus_num << 16; - _pci_conf_write(pcidev->pa.pa_tag, PCI_PRIBUS_1, tmp); + if(pcidev->parent) + _pci_conf_write(pcidev->pa.pa_tag, PCI_PRIBUS_1, tmp); } pd->bridge.secbus = pmalloc(sizeof(struct pci_bus));