-/* $OpenBSD: if_vmx.c,v 1.69 2022/03/11 18:00:50 mpi Exp $ */
+/* $OpenBSD: if_vmx.c,v 1.70 2022/09/11 08:38:39 yasuoka Exp $ */
/*
* Copyright (c) 2013 Tsubai Masanari
printf(": failed to map interrupt\n");
return;
}
+ intrstr = pci_intr_string(pa->pa_pc, ih);
sc->sc_ih = pci_intr_establish(pa->pa_pc, ih, IPL_NET | IPL_MPSAFE,
isr, sc, self->dv_xname);
- intrstr = pci_intr_string(pa->pa_pc, ih);
+ if (sc->sc_ih == NULL) {
+ printf(": unable to establish interrupt handler");
+ if (intrstr != NULL)
+ printf(" at %s", intrstr);
+ printf("\n");
+ return;
+ }
if (intrstr)
printf(": %s", intrstr);
IPL_NET | IPL_MPSAFE,
intrmap_cpu(sc->sc_intrmap, i),
vmxnet3_intr_queue, q, q->intrname);
+ if (q->ih == NULL) {
+ printf(": unable to establish interrupt %d\n",
+ vec);
+ return;
+ }
q->intr = vec;
q->sc = sc;