Page MenuHomeFreeBSD

D60472.id189063.diff
No OneTemporary

D60472.id189063.diff

diff --git a/sys/dev/nvmf/controller/nvmft_controller.c b/sys/dev/nvmf/controller/nvmft_controller.c
--- a/sys/dev/nvmf/controller/nvmft_controller.c
+++ b/sys/dev/nvmf/controller/nvmft_controller.c
@@ -820,7 +820,9 @@
{
struct nvmft_port *np = ctrlr->np;
uint32_t changes;
+ bool cancel_terminate;
+ cancel_terminate = false;
*need_shutdown = false;
mtx_lock(&ctrlr->lock);
@@ -858,12 +860,24 @@
*need_shutdown = true;
} else if (!ctrlr->shutdown) {
/* Controller enable. */
+ cancel_terminate = true;
ctrlr->csts &= ~NVMEM(NVME_CSTS_REG_SHST);
ctrlr->csts |= NVMEF(NVME_CSTS_REG_RDY, 1);
}
}
mtx_unlock(&ctrlr->lock);
+ if (cancel_terminate) {
+ /*
+ * If a controller has been re-enabled after a
+ * shutdown, the terminate task from the shutdown
+ * might still be scheduled.
+ */
+ taskqueue_cancel_timeout(taskqueue_thread,
+ &ctrlr->terminate_task, NULL);
+ taskqueue_drain_timeout(taskqueue_thread,
+ &ctrlr->terminate_task);
+ }
return (true);
}

File Metadata

Mime Type
text/plain
Expires
Sat, Oct 10, 2:49 PM (20 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40491353
Default Alt Text
D60472.id189063.diff (1 KB)

Event Timeline