Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F175160249
D60472.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D60472.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Fri, Oct 9, 6:28 PM (6 m, 8 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
40491353
Default Alt Text
D60472.diff (1 KB)
Attached To
Mode
D60472: nvmft: Cancel and drain any existing terminate task when enabling a controller
Attached
Detach File
Event Timeline
Log In to Comment