Index: sys/dev/nvme/nvme_ctrlr.c =================================================================== --- sys/dev/nvme/nvme_ctrlr.c +++ sys/dev/nvme/nvme_ctrlr.c @@ -132,6 +132,7 @@ uint16_t mqes; int c, error, i, n; int num_entries, num_trackers, max_entries; + bool bind_intr; /* * NVMe spec sets a hard limit of 64K max entries, but devices may @@ -174,6 +175,7 @@ ctrlr->ioq = malloc(ctrlr->num_io_queues * sizeof(struct nvme_qpair), M_NVME, M_ZERO | M_WAITOK); + bind_intr = ctrlr->num_io_queues > 1; for (i = c = n = 0; i < ctrlr->num_io_queues; i++, c += n) { qpair = &ctrlr->ioq[i]; @@ -207,8 +209,16 @@ * Do not bother binding interrupts if we only have one I/O * interrupt thread for this controller. */ - if (ctrlr->num_io_queues > 1) - bus_bind_intr(ctrlr->dev, qpair->res, qpair->cpu); + if (bind_intr) { + if (bus_bind_intr(ctrlr->dev, qpair->res, + qpair->cpu) != 0) { + nvme_printf(ctrlr, + "bus_bind_intr to CPU %u failed\n", + qpair->cpu); + /* Give up on the remainder. */ + bind_intr = false; + } + } } return (0);