diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c --- a/sys/dev/nvme/nvme_ctrlr.c +++ b/sys/dev/nvme/nvme_ctrlr.c @@ -232,35 +232,6 @@ nvme_notify_fail_consumers(ctrlr); } -void -nvme_ctrlr_post_failed_request(struct nvme_controller *ctrlr, - struct nvme_request *req) -{ - - mtx_lock(&ctrlr->lock); - STAILQ_INSERT_TAIL(&ctrlr->fail_req, req, stailq); - mtx_unlock(&ctrlr->lock); - if (!ctrlr->is_dying) - taskqueue_enqueue(ctrlr->taskqueue, &ctrlr->fail_req_task); -} - -static void -nvme_ctrlr_fail_req_task(void *arg, int pending) -{ - struct nvme_controller *ctrlr = arg; - struct nvme_request *req; - - mtx_lock(&ctrlr->lock); - while ((req = STAILQ_FIRST(&ctrlr->fail_req)) != NULL) { - STAILQ_REMOVE_HEAD(&ctrlr->fail_req, stailq); - mtx_unlock(&ctrlr->lock); - nvme_qpair_manual_complete_request(req->qpair, req, - NVME_SCT_GENERIC, NVME_SC_ABORTED_BY_REQUEST); - mtx_lock(&ctrlr->lock); - } - mtx_unlock(&ctrlr->lock); -} - /* * Wait for RDY to change. * @@ -1487,7 +1458,6 @@ ctrlr->is_initialized = 0; ctrlr->notification_sent = 0; TASK_INIT(&ctrlr->reset_task, 0, nvme_ctrlr_reset_task, ctrlr); - TASK_INIT(&ctrlr->fail_req_task, 0, nvme_ctrlr_fail_req_task, ctrlr); STAILQ_INIT(&ctrlr->fail_req); ctrlr->is_failed = false; diff --git a/sys/dev/nvme/nvme_private.h b/sys/dev/nvme/nvme_private.h --- a/sys/dev/nvme/nvme_private.h +++ b/sys/dev/nvme/nvme_private.h @@ -255,7 +255,6 @@ uint32_t queues_created; struct task reset_task; - struct task fail_req_task; struct taskqueue *taskqueue; /* For shared legacy interrupt. */ @@ -410,8 +409,6 @@ struct nvme_request *req); void nvme_ctrlr_submit_io_request(struct nvme_controller *ctrlr, struct nvme_request *req); -void nvme_ctrlr_post_failed_request(struct nvme_controller *ctrlr, - struct nvme_request *req); int nvme_qpair_construct(struct nvme_qpair *qpair, uint32_t num_entries, uint32_t num_trackers,