diff --git a/sys/dev/nvme/nvme_sim.c b/sys/dev/nvme/nvme_sim.c --- a/sys/dev/nvme/nvme_sim.c +++ b/sys/dev/nvme/nvme_sim.c @@ -268,11 +268,19 @@ ccb->ccb_h.status = CAM_REQ_CMP; break; case XPT_NVME_IO: /* Execute the requested I/O operation */ - case XPT_NVME_ADMIN: /* or Admin operation */ + /* + * I/O commands can't work once we've failed the drive, but + * admin commands might still work or issue vendor specific + * commands to reset the card after a failure. Worst case is + * that the admin commands will fail inside the sim when the + * hardware rejects them or they timeout. + */ if (ctrlr->is_failed) { ccb->ccb_h.status = CAM_DEV_NOT_THERE; break; } + /*FALLTHROUGH*/ + case XPT_NVME_ADMIN: /* or Admin operation */ nvme_sim_nvmeio(sim, ccb); return; /* no done */ default: