Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/nvme/nvme_qpair.c
Show First 20 Lines • Show All 665 Lines • ▼ Show 20 Lines | if (ctrlr->msix_enabled) { | ||||
/* | /* | ||||
* MSI-X vector resource IDs start at 1, so we add one to | * MSI-X vector resource IDs start at 1, so we add one to | ||||
* the queue's vector to get the corresponding rid to use. | * the queue's vector to get the corresponding rid to use. | ||||
*/ | */ | ||||
qpair->rid = qpair->vector + 1; | qpair->rid = qpair->vector + 1; | ||||
qpair->res = bus_alloc_resource_any(ctrlr->dev, SYS_RES_IRQ, | qpair->res = bus_alloc_resource_any(ctrlr->dev, SYS_RES_IRQ, | ||||
&qpair->rid, RF_ACTIVE); | &qpair->rid, RF_ACTIVE); | ||||
bus_setup_intr(ctrlr->dev, qpair->res, | if (bus_setup_intr(ctrlr->dev, qpair->res, | ||||
INTR_TYPE_MISC | INTR_MPSAFE, NULL, | INTR_TYPE_MISC | INTR_MPSAFE, NULL, | ||||
nvme_qpair_msix_handler, qpair, &qpair->tag); | nvme_qpair_msix_handler, qpair, &qpair->tag) != 0) { | ||||
nvme_printf(ctrlr, "unable to setup intx handler\n"); | |||||
goto out; | |||||
} | |||||
if (qpair->id == 0) { | if (qpair->id == 0) { | ||||
bus_describe_intr(ctrlr->dev, qpair->res, qpair->tag, | bus_describe_intr(ctrlr->dev, qpair->res, qpair->tag, | ||||
"admin"); | "admin"); | ||||
} else { | } else { | ||||
bus_describe_intr(ctrlr->dev, qpair->res, qpair->tag, | bus_describe_intr(ctrlr->dev, qpair->res, qpair->tag, | ||||
"io%d", qpair->id - 1); | "io%d", qpair->id - 1); | ||||
} | } | ||||
} | } | ||||
▲ Show 20 Lines • Show All 596 Lines • Show Last 20 Lines |