diff options
author | se <se@FreeBSD.org> | 1997-06-02 19:59:01 +0000 |
---|---|---|
committer | se <se@FreeBSD.org> | 1997-06-02 19:59:01 +0000 |
commit | 32049883878fdea7b2b382f48f142a811d507c47 (patch) | |
tree | d2d18cd6d8381536c362d0b739921c8c178b6a53 /sys/pci/pci.c | |
parent | 9ad77f813d253002b177ffa0d670ff9d0af7d093 (diff) | |
download | FreeBSD-src-32049883878fdea7b2b382f48f142a811d507c47.zip FreeBSD-src-32049883878fdea7b2b382f48f142a811d507c47.tar.gz |
Move call of pci_addcfg() before test of cfg->subordinatebus, since the
device probe of a host to PCI bridge may modify that value, based on
its knowledge of device specific registers. This makes the Intel XXpress
work, as verified by: Terje Marthinussen <terjem@cc.uit.no>.
Diffstat (limited to 'sys/pci/pci.c')
-rw-r--r-- | sys/pci/pci.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/sys/pci/pci.c b/sys/pci/pci.c index 244fb01..50b7d56 100644 --- a/sys/pci/pci.c +++ b/sys/pci/pci.c @@ -23,7 +23,7 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: pci.c,v 1.74 1997/05/27 19:24:36 fsmp Exp $ + * $Id: pci.c,v 1.75 1997/05/28 10:01:03 se Exp $ * */ @@ -426,11 +426,22 @@ pci_probebus(int bus) if (cfg != NULL) { if (cfg->mfdev) pcifunchigh = 7; + /* + * XXX: Temporarily move pci_addcfg() up before + * the use of cfg->subordinatebus. This is + * necessary, since pci_addcfg() calls the + * device's probe(), which may read the bus# + * from some device dependent register of + * some host to PCI bridges. The probe will + * eventually be moved to pci_readcfg(), and + * pci_addcfg() will then be moved back down + * below the conditional statement ... + */ + pci_addcfg(cfg); if (bushigh < cfg->subordinatebus) bushigh = cfg->subordinatebus; - pci_addcfg(cfg); cfg = NULL; /* we don't own this anymore ... */ } } |