Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Jul 2013 22:14:39 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 231114 for review
Message-ID:  <201307122214.r6CMEd0O096634@skunkworks.freebsd.org>

next in thread | raw e-mail | index | archive | help

http://p4web.freebsd.org/@@231114?ac=10

Change 231114 by jhb@jhb_jhbbsd on 2013/07/12 22:13:46

	Always write primary bus numbers for PCI bridges.

Affected files ...

.. //depot/projects/pci/sys/dev/pccbb/pccbb_pci.c#8 edit
.. //depot/projects/pci/sys/dev/pci/pci_pci.c#39 edit

Differences ...

==== //depot/projects/pci/sys/dev/pccbb/pccbb_pci.c#8 (text+ko) ====

@@ -325,6 +325,7 @@
 	sc->bus.sub = pci_read_config(brdev, PCIR_SUBBUS_2, 1);
 	sc->pribus = pcib_get_bus(parent);
 #if defined(NEW_PCIB) && defined(PCI_RES_BUS)
+	pci_write_config(brdev, PCIR_PRIBUS_2, sc->pribus, 1);
 	sc->bus.sec_reg = PCIR_SECBUS_2;
 	sc->bus.sub_reg = PCIR_SUBBUS_2;
 	pcib_setup_secbus(brdev, &sc->bus);

==== //depot/projects/pci/sys/dev/pci/pci_pci.c#39 (text+ko) ====

@@ -948,6 +948,13 @@
     pcib_cfg_save(sc);
 
     /*
+     * The primary bus register should always be the bus of the
+     * parent.
+     */
+    sc->pribus = pci_get_bus(dev);
+    pci_write_config(dev, PCIR_PRIBUS_1, sc->pribus, 1);
+
+    /*
      * Setup sysctl reporting nodes
      */
     sctx = device_get_sysctl_ctx(dev);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201307122214.r6CMEd0O096634>