diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2009-09-18 20:17:18 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2009-09-18 20:17:18 +0000 |
commit | a96c8885af9c39fefdd26be523e5516dc9d1c028 (patch) | |
tree | 2243717a0968cc762a9cff87e92e0c1d4a48e145 /sys/arch/i386 | |
parent | 0b4d73772f38f9c1604a1045e8f2b6556a49601a (diff) |
For some dark reason there's a bit on the VLINK device of this chipset
that makes the PCIE device show up as a host bridge instead of a
PCI-PCI bridge. As a result any devices sitting behind it won't be
detected. Whack the device into PCI-PCI mode such that we can walk the
PCI bus hierarchy the normal way and detect all devices. Fixes PR 6215.
ok dlg@
Diffstat (limited to 'sys/arch/i386')
-rw-r--r-- | sys/arch/i386/pci/pchb.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/sys/arch/i386/pci/pchb.c b/sys/arch/i386/pci/pchb.c index 8b68557f586..5da60a085c2 100644 --- a/sys/arch/i386/pci/pchb.c +++ b/sys/arch/i386/pci/pchb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pchb.c,v 1.77 2009/04/11 14:59:59 kettenis Exp $ */ +/* $OpenBSD: pchb.c,v 1.78 2009/09/18 20:17:17 kettenis Exp $ */ /* $NetBSD: pchb.c,v 1.65 2007/08/15 02:26:13 markd Exp $ */ /* @@ -345,6 +345,23 @@ pchbattach(struct device *parent, struct device *self, void *aux) } printf("\n"); break; + case PCI_VENDOR_VIATECH: + switch (PCI_PRODUCT(pa->pa_id)) { + case PCI_PRODUCT_VIATECH_VT8251_VLINK: + /* + * For some strange reason, the VIA VT8251 + * chipset can be configured to its PCIe + * bridge show up as a host bridge. We whack + * it into PCI bridge mode here such that we + * can see the devices behind it. + */ + bcreg = pci_conf_read(pa->pa_pc, pa->pa_tag, 0xfc); + bcreg &= ~0x00000004; /* XXX Magic */ + pci_conf_write(pa->pa_pc, pa->pa_tag, 0xfc, bcreg); + break; + } + printf("\n"); + break; default: printf("\n"); break; |