From 61ca5ddc65874b95e765bb5859e4f38511d356fd Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Sun, 26 Jun 2011 23:00:29 +0000 Subject: 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. --- sys/dev/pci/ppb.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 & 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)); -- cgit v1.2.3