summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2011-12-04 20:08:10 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2011-12-04 20:08:10 +0000
commitb1ad9d2f0939cb325347cbc470bba2e6406ac3c7 (patch)
treeab20350aa4604d2a4856ae4ce6198fe7d92c88a9 /sys/arch
parent77064b1668f957ac68e468feaae31917ba5d0d5b (diff)
Slightly different fix for the problem fixed by the previous commit for better
diffability with the amd64 codebase.
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/i386/pci/pci_machdep.c33
1 files changed, 19 insertions, 14 deletions
diff --git a/sys/arch/i386/pci/pci_machdep.c b/sys/arch/i386/pci/pci_machdep.c
index 66226018509..0fecc1935b9 100644
--- a/sys/arch/i386/pci/pci_machdep.c
+++ b/sys/arch/i386/pci/pci_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci_machdep.c,v 1.67 2011/12/04 17:38:44 miod Exp $ */
+/* $OpenBSD: pci_machdep.c,v 1.68 2011/12/04 20:08:09 kettenis Exp $ */
/* $NetBSD: pci_machdep.c,v 1.28 1997/06/06 23:29:17 thorpej Exp $ */
/*-
@@ -212,6 +212,13 @@ pci_attach_hook(struct device *parent, struct device *self,
return;
/*
+ * Machines that use the non-standard method of generating PCI
+ * configuration cycles are way too old to support MSI.
+ */
+ if (pci_mode == 2)
+ return;
+
+ /*
* In order to decide whether the system supports MSI we look
* at the host bridge, which should be device 0 function 0 on
* bus 0. It is better to not enable MSI on systems that
@@ -298,19 +305,17 @@ pci_attach_hook(struct device *parent, struct device *self,
break;
}
- if (pci_mode != 2) {
- /*
- * Don't enable MSI on a HyperTransport bus. In order to
- * determine that bus 0 is a HyperTransport bus, we look at
- * device 24 function 0, which is the HyperTransport
- * host/primary interface integrated on most 64-bit AMD CPUs.
- * If that device has a HyperTransport capability, bus 0 must
- * be a HyperTransport bus and we disable MSI.
- */
- tag = pci_make_tag(pc, 0, 24, 0);
- if (pci_get_capability(pc, tag, PCI_CAP_HT, NULL, NULL))
- pba->pba_flags &= ~PCI_FLAGS_MSI_ENABLED;
- }
+ /*
+ * Don't enable MSI on a HyperTransport bus. In order to
+ * determine that bus 0 is a HyperTransport bus, we look at
+ * device 24 function 0, which is the HyperTransport
+ * host/primary interface integrated on most 64-bit AMD CPUs.
+ * If that device has a HyperTransport capability, bus 0 must
+ * be a HyperTransport bus and we disable MSI.
+ */
+ tag = pci_make_tag(pc, 0, 24, 0);
+ if (pci_get_capability(pc, tag, PCI_CAP_HT, NULL, NULL))
+ pba->pba_flags &= ~PCI_FLAGS_MSI_ENABLED;
}
int