diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2010-04-02 19:23:06 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2010-04-02 19:23:06 +0000 |
commit | fe3764c459102e582e2b29c3dc4654537698ed22 (patch) | |
tree | 35ff88b951554bc89dd3106746d3e1a56a3a1491 /sys | |
parent | c9317becd427b1db9ee46c9b534224aac6eceab4 (diff) |
For the VT8251 host bridge, only attach the pci bus is non-zero, otherwise
keep attaching bus 0 forever.
tested by mk@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/amd64/pci/pchb.c | 5 | ||||
-rw-r--r-- | sys/arch/i386/pci/pchb.c | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/sys/arch/amd64/pci/pchb.c b/sys/arch/amd64/pci/pchb.c index dee6033b0bd..12369959e4a 100644 --- a/sys/arch/amd64/pci/pchb.c +++ b/sys/arch/amd64/pci/pchb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pchb.c,v 1.32 2010/02/09 19:36:05 kettenis Exp $ */ +/* $OpenBSD: pchb.c,v 1.33 2010/04/02 19:23:05 kettenis Exp $ */ /* $NetBSD: pchb.c,v 1.1 2003/04/26 18:39:50 fvdl Exp $ */ /* * Copyright (c) 2000 Michael Shalayeff @@ -222,7 +222,8 @@ pchbattach(struct device *parent, struct device *self, void *aux) bir = pci_conf_read(pa->pa_pc, pa->pa_tag, PPB_REG_BUSINFO); pbnum = PPB_BUSINFO_PRIMARY(bir); - doattach = 1; + if (pbnum > 0) + doattach = 1; /* Switch back to host bridge mode. */ bcreg |= 0x00000004; /* XXX Magic */ diff --git a/sys/arch/i386/pci/pchb.c b/sys/arch/i386/pci/pchb.c index 2321e146130..fd2ab63920d 100644 --- a/sys/arch/i386/pci/pchb.c +++ b/sys/arch/i386/pci/pchb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pchb.c,v 1.80 2010/02/09 19:36:05 kettenis Exp $ */ +/* $OpenBSD: pchb.c,v 1.81 2010/04/02 19:23:05 kettenis Exp $ */ /* $NetBSD: pchb.c,v 1.65 2007/08/15 02:26:13 markd Exp $ */ /* @@ -365,7 +365,8 @@ pchbattach(struct device *parent, struct device *self, void *aux) bir = pci_conf_read(pa->pa_pc, pa->pa_tag, PPB_REG_BUSINFO); pbnum = PPB_BUSINFO_PRIMARY(bir); - doattach = 1; + if (pbnum > 0) + doattach = 1; /* Switch back to host bridge mode. */ bcreg |= 0x00000004; /* XXX Magic */ |