summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2011-06-26 23:00:29 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2011-06-26 23:00:29 +0000
commit61ca5ddc65874b95e765bb5859e4f38511d356fd (patch)
treef10fe76bc960327f45ed18350180c8a98dbb11b9
parentfaf5f1c428343fb3b63d0d5c8e1f3281e5fb096a (diff)
There are some problems with ppb msi interrupts. For instance, i386 in
some situations can run out of vectors. On amd64, there is at least one machine that fails to resume. Yes, those problems need to be fixed. But other problems should be found, too. If we leave ppb msi off, we won't learn anything new. So use an #ifdef to enable ppb msi for non-i386, temporarily. Kind of discussed this with kettenis.
-rw-r--r--sys/dev/pci/ppb.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/dev/pci/ppb.c b/sys/dev/pci/ppb.c
index 286dac1533f..22c4abbb99c 100644
--- a/sys/dev/pci/ppb.c
+++ b/sys/dev/pci/ppb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ppb.c,v 1.51 2011/06/05 22:14:22 kettenis Exp $ */
+/* $OpenBSD: ppb.c,v 1.52 2011/06/26 23:00:28 deraadt Exp $ */
/* $NetBSD: ppb.c,v 1.16 1997/06/06 23:48:05 thorpej Exp $ */
/*
@@ -169,9 +169,16 @@ ppbattach(struct device *parent, struct device *self, void *aux)
/* Check for PCI Express capabilities and setup hotplug support. */
if (pci_get_capability(pc, pa->pa_tag, PCI_CAP_PCIEXPRESS,
&sc->sc_cap_off, &reg) && (reg & PCI_PCIE_XCAP_SI)) {
+#ifdef __i386__
if (pci_intr_map(pa, &ih) == 0)
sc->sc_intrhand = pci_intr_establish(pc, ih, IPL_BIO,
ppb_intr, sc, self->dv_xname);
+#else
+ if (pci_intr_map_msi(pa, &ih) == 0 ||
+ pci_intr_map(pa, &ih) == 0)
+ sc->sc_intrhand = pci_intr_establish(pc, ih, IPL_BIO,
+ ppb_intr, sc, self->dv_xname);
+#endif
if (sc->sc_intrhand) {
printf(": %s", pci_intr_string(pc, ih));