Do not use taskqueue to defer completion work when using INTx. INTx now
matches MSI-X behavior. Sponsored by: Intel
This commit is contained in:
parent
ad9d6ff06a
commit
4d6abcb19f
@ -298,11 +298,6 @@ nvme_detach (device_t dev)
|
||||
struct nvme_namespace *ns;
|
||||
int i;
|
||||
|
||||
if (ctrlr->taskqueue) {
|
||||
taskqueue_drain(ctrlr->taskqueue, &ctrlr->task);
|
||||
taskqueue_free(ctrlr->taskqueue);
|
||||
}
|
||||
|
||||
for (i = 0; i < NVME_MAX_NAMESPACES; i++) {
|
||||
ns = &ctrlr->ns[i];
|
||||
if (ns->cdev)
|
||||
|
@ -619,10 +619,12 @@ err:
|
||||
}
|
||||
|
||||
static void
|
||||
nvme_ctrlr_intx_task(void *arg, int pending)
|
||||
nvme_ctrlr_intx_handler(void *arg)
|
||||
{
|
||||
struct nvme_controller *ctrlr = arg;
|
||||
|
||||
nvme_mmio_write_4(ctrlr, intms, 1);
|
||||
|
||||
nvme_qpair_process_completions(&ctrlr->adminq);
|
||||
|
||||
if (ctrlr->ioq[0].cpl)
|
||||
@ -631,15 +633,6 @@ nvme_ctrlr_intx_task(void *arg, int pending)
|
||||
nvme_mmio_write_4(ctrlr, intmc, 1);
|
||||
}
|
||||
|
||||
static void
|
||||
nvme_ctrlr_intx_handler(void *arg)
|
||||
{
|
||||
struct nvme_controller *ctrlr = arg;
|
||||
|
||||
nvme_mmio_write_4(ctrlr, intms, 1);
|
||||
taskqueue_enqueue_fast(ctrlr->taskqueue, &ctrlr->task);
|
||||
}
|
||||
|
||||
static int
|
||||
nvme_ctrlr_configure_intx(struct nvme_controller *ctrlr)
|
||||
{
|
||||
@ -665,12 +658,6 @@ nvme_ctrlr_configure_intx(struct nvme_controller *ctrlr)
|
||||
return (ENOMEM);
|
||||
}
|
||||
|
||||
TASK_INIT(&ctrlr->task, 0, nvme_ctrlr_intx_task, ctrlr);
|
||||
ctrlr->taskqueue = taskqueue_create_fast("nvme_taskq", M_NOWAIT,
|
||||
taskqueue_thread_enqueue, &ctrlr->taskqueue);
|
||||
taskqueue_start_threads(&ctrlr->taskqueue, 1, PI_NET,
|
||||
"%s intx taskq", device_get_nameunit(ctrlr->dev));
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
@ -36,7 +36,6 @@
|
||||
#include <sys/mutex.h>
|
||||
#include <sys/rman.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/taskqueue.h>
|
||||
|
||||
#include <vm/uma.h>
|
||||
|
||||
@ -222,8 +221,6 @@ struct nvme_controller {
|
||||
int rid;
|
||||
struct resource *res;
|
||||
void *tag;
|
||||
struct task task;
|
||||
struct taskqueue *taskqueue;
|
||||
|
||||
bus_dma_tag_t hw_desc_tag;
|
||||
bus_dmamap_t hw_desc_map;
|
||||
|
Loading…
x
Reference in New Issue
Block a user