From c53c5c6a9bb62c8515c10a56c6bf3c39be0a2b18 Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Mon, 18 Jul 2016 09:13:15 -0700 Subject: [PATCH] nvmf: stub out CC.EN reset path It is not implemented yet, but add a message to remind us to write it later. Change-Id: Ic1c35a0d35f728bc63b38c334d9c622493bee967 Signed-off-by: Daniel Verkamp --- lib/nvmf/session.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/nvmf/session.c b/lib/nvmf/session.c index 6637869ea5..ca8c3e7dae 100644 --- a/lib/nvmf/session.c +++ b/lib/nvmf/session.c @@ -323,9 +323,14 @@ nvmf_prop_set_cc(struct nvmf_session *session, uint64_t value) cc.raw = (uint32_t)value; - if (cc.bits.en && !session->vcprop.cc.bits.en) { - SPDK_TRACELOG(SPDK_TRACE_NVMF, "Property Set CC Enable!\n"); - session->vcprop.csts.bits.rdy = 1; + if (cc.bits.en ^ session->vcprop.cc.bits.en) { + if (cc.bits.en) { + SPDK_TRACELOG(SPDK_TRACE_NVMF, "Property Set CC Enable!\n"); + session->vcprop.csts.bits.rdy = 1; + } else { + SPDK_ERRLOG("CC.EN transition from 1 to 0 (reset) not implemented!\n"); + /* TODO: reset */ + } } if (cc.bits.shn == SPDK_NVME_SHN_NORMAL ||