nvme: Add a clarifying comment

While it is easy enough to bounce over to nvme.c from nvme_ctrlr.c to
find this out, I've had to do that several times, so a little bit of
context is quite helpful.

Sponsored by:		Netflix
This commit is contained in:
Warner Losh 2024-08-13 16:45:17 -06:00
parent d40fc35f93
commit 8c44df321c

View file

@ -1588,6 +1588,12 @@ nvme_ctrlr_construct(struct nvme_controller *ctrlr, device_t dev)
return (0);
}
/*
* Called on detach, or on error on attach. The nvme_controller won't be used
* again once we return, so we have to tear everything down (so nothing
* references this, no callbacks, etc), but don't need to reset all the state
* since nvme_controller will be freed soon.
*/
void
nvme_ctrlr_destruct(struct nvme_controller *ctrlr, device_t dev)
{