summaryrefslogtreecommitdiffstats
path: root/sys/dev/pci/pci.c
diff options
context:
space:
mode:
authorbrad <brad@openbsd.org>2007-11-17 23:20:38 +0000
committerbrad <brad@openbsd.org>2007-11-17 23:20:38 +0000
commitb8e88d1ad94cb2cac0158d3d55b6065c49095cae (patch)
tree9a0f016b991bd9e936bfe7e80948b6ce97135bb6 /sys/dev/pci/pci.c
parentthe ACPI -> ACPI (diff)
downloadwireguard-openbsd-b8e88d1ad94cb2cac0158d3d55b6065c49095cae.tar.xz
wireguard-openbsd-b8e88d1ad94cb2cac0158d3d55b6065c49095cae.zip
Allow pci_get_capability to decode capabilities for PCI bridges.
From jmcneill NetBSD ok kettenis@ dlg@
Diffstat (limited to 'sys/dev/pci/pci.c')
-rw-r--r--sys/dev/pci/pci.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c
index 8a56aef3468..4bf343f8862 100644
--- a/sys/dev/pci/pci.c
+++ b/sys/dev/pci/pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci.c,v 1.51 2007/10/22 03:08:53 fgsch Exp $ */
+/* $OpenBSD: pci.c,v 1.52 2007/11/17 23:20:38 brad Exp $ */
/* $NetBSD: pci.c,v 1.31 1997/06/06 23:48:04 thorpej Exp $ */
/*
@@ -363,9 +363,10 @@ pci_get_capability(pci_chipset_tag_t pc, pcitag_t tag, int capid,
reg = pci_conf_read(pc, tag, PCI_BHLC_REG);
switch (PCI_HDRTYPE_TYPE(reg)) {
case 0: /* standard device header */
+ case 1: /* PCI-PCI bridge header */
ofs = PCI_CAPLISTPTR_REG;
break;
- case 2: /* PCI-CardBus Bridge header */
+ case 2: /* PCI-CardBus bridge header */
ofs = PCI_CARDBUS_CAPLISTPTR_REG;
break;
default: