Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/nvme/nvme_qpair.c
Show First 20 Lines • Show All 1,071 Lines • ▼ Show 20 Lines | _nvme_qpair_submit_request(struct nvme_qpair *qpair, struct nvme_request *req) | ||||
if (tr == NULL || !qpair->is_enabled) { | if (tr == NULL || !qpair->is_enabled) { | ||||
/* | /* | ||||
* No tracker is available, or the qpair is disabled due to | * No tracker is available, or the qpair is disabled due to | ||||
* an in-progress controller-level reset or controller | * an in-progress controller-level reset or controller | ||||
* failure. | * failure. | ||||
*/ | */ | ||||
if (qpair->ctrlr->is_failed) { | if (qpair->ctrlr->is_failed) { | ||||
/* | /* | ||||
* The controller has failed. Post the request to a | * The controller has failed, so fail the request. | ||||
chuck: Should this comment get updated as `nvme_qpair_manual_complete_request()` isn't posting to a… | |||||
* task where it will be aborted, so that we do not | |||||
* invoke the request's callback in the context | |||||
* of the submission. | |||||
*/ | */ | ||||
nvme_ctrlr_post_failed_request(qpair->ctrlr, req); | nvme_qpair_manual_complete_request(qpair, req, | ||||
NVME_SCT_GENERIC, NVME_SC_ABORTED_BY_REQUEST); | |||||
} else { | } else { | ||||
/* | /* | ||||
* Put the request on the qpair's request queue to be | * Put the request on the qpair's request queue to be | ||||
* processed when a tracker frees up via a command | * processed when a tracker frees up via a command | ||||
* completion or when the controller reset is | * completion or when the controller reset is | ||||
* completed. | * completed. | ||||
*/ | */ | ||||
STAILQ_INSERT_TAIL(&qpair->queued_req, req, stailq); | STAILQ_INSERT_TAIL(&qpair->queued_req, req, stailq); | ||||
▲ Show 20 Lines • Show All 222 Lines • Show Last 20 Lines |
Should this comment get updated as nvme_qpair_manual_complete_request() isn't posting to a task?