summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/arch/amd64/pci/pci_machdep.c7
-rw-r--r--sys/arch/i386/pci/pci_machdep.c8
2 files changed, 6 insertions, 9 deletions
diff --git a/sys/arch/amd64/pci/pci_machdep.c b/sys/arch/amd64/pci/pci_machdep.c
index 9fac42f5785..4098fa2bb13 100644
--- a/sys/arch/amd64/pci/pci_machdep.c
+++ b/sys/arch/amd64/pci/pci_machdep.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pci_machdep.c,v 1.58 2013/11/06 10:40:36 mpi Exp $ */
+/* $OpenBSD: pci_machdep.c,v 1.59 2014/04/19 11:53:42 kettenis Exp $ */
/* $NetBSD: pci_machdep.c,v 1.3 2003/05/07 21:33:58 fvdl Exp $ */
/*-
@@ -375,9 +375,8 @@ msi_delroute(struct pic *pic, struct cpu_info *ci, int pin, int vec, int type)
pcireg_t reg;
int off;
- if (pci_get_capability(pc, tag, PCI_CAP_MSI, &off, &reg) == 0)
- panic("%s: no msi capability", __func__);
- pci_conf_write(pc, tag, off, reg & ~PCI_MSI_MC_MSIE);
+ if (pci_get_capability(pc, tag, PCI_CAP_MSI, &off, &reg))
+ pci_conf_write(pc, tag, off, reg & ~PCI_MSI_MC_MSIE);
}
int
diff --git a/sys/arch/i386/pci/pci_machdep.c b/sys/arch/i386/pci/pci_machdep.c
index d7b394a81c5..cc3a24f1000 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.77 2013/11/06 10:40:36 mpi Exp $ */
+/* $OpenBSD: pci_machdep.c,v 1.78 2014/04/19 11:53:42 kettenis Exp $ */
/* $NetBSD: pci_machdep.c,v 1.28 1997/06/06 23:29:17 thorpej Exp $ */
/*-
@@ -859,10 +859,8 @@ pci_intr_disestablish(pci_chipset_tag_t pc, void *cookie)
pcireg_t reg;
int off;
- if (pci_get_capability(pc, tag, PCI_CAP_MSI, &off, &reg) == 0)
- panic("%s: no msi capability", __func__);
-
- pci_conf_write(pc, tag, off, reg &= ~PCI_MSI_MC_MSIE);
+ if (pci_get_capability(pc, tag, PCI_CAP_MSI, &off, &reg))
+ pci_conf_write(pc, tag, off, reg &= ~PCI_MSI_MC_MSIE);
apic_maxlevel[ih->ih_vec] = 0;
apic_intrhand[ih->ih_vec] = NULL;