Index: sys/dev/nvme/nvme_qpair.c =================================================================== --- sys/dev/nvme/nvme_qpair.c +++ sys/dev/nvme/nvme_qpair.c @@ -1096,7 +1096,8 @@ * 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 { /* * Put the request on the qpair's request queue to be Index: sys/dev/nvme/nvme_sim.c =================================================================== --- sys/dev/nvme/nvme_sim.c +++ sys/dev/nvme/nvme_sim.c @@ -258,6 +258,10 @@ break; case XPT_NVME_IO: /* Execute the requested I/O operation */ case XPT_NVME_ADMIN: /* or Admin operation */ + if (ctrlr->is_failed) { + ccb->ccb_h.status = CAM_REQ_DEV_NOT_THERE; + break; + } nvme_sim_nvmeio(sim, ccb); return; /* no done */ default: