summaryrefslogtreecommitdiff
path: root/sys/arch/i386/pci/pci_machdep.c
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2014-04-19 11:53:43 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2014-04-19 11:53:43 +0000
commit5d0e5b04021c555c735d37e7cdc9d04e3e450023 (patch)
tree5f760b170d0ad7f1c58334e0d9d3529e33ecba7d /sys/arch/i386/pci/pci_machdep.c
parent141966a22562a32180a51619ea934c0cb75be3db (diff)
Don't panic if we're trying to disestablish an MSI but the hardware is gone.
tested by & ok mlarkin@
Diffstat (limited to 'sys/arch/i386/pci/pci_machdep.c')
-rw-r--r--sys/arch/i386/pci/pci_machdep.c8
1 files changed, 3 insertions, 5 deletions
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;