From 71e2b5bf17fb4cf26a6f5c4ad0ededde9e7e45f8 Mon Sep 17 00:00:00 2001 From: Luqman Aden Date: Mon, 4 Dec 2023 14:22:16 -0800 Subject: [PATCH] nvme: log controller enable/disable --- lib/propolis/src/hw/nvme/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/propolis/src/hw/nvme/mod.rs b/lib/propolis/src/hw/nvme/mod.rs index 9a1be7065..699e6b9bb 100644 --- a/lib/propolis/src/hw/nvme/mod.rs +++ b/lib/propolis/src/hw/nvme/mod.rs @@ -618,6 +618,8 @@ impl PciNvme { let cur = state.ctrl.cc; if new.enabled() && !cur.enabled() { + slog::info!(self.log, "Enabling controller"); + let mem = self.mem_access(); let mem = mem.ok_or(NvmeError::MemoryInaccessible)?; @@ -633,6 +635,8 @@ impl PciNvme { state.ctrl.csts.set_ready(true); } } else if !new.enabled() && cur.enabled() { + slog::info!(self.log, "Disabling controller"); + // Reset controller state which will set CC.EN=0 and CSTS.RDY=0 state.reset(); }