nvmf: update CSTS when host writes CC.SHN
Set CSTS.SHST = 10b to indicate that shutdown is complete, and CSTS.RDY = 0 to match the state of CC.EN. Change-Id: Ia651c34427526a38f22cba3910df2cf7d4bedd92 Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
parent
0cb9522781
commit
8a2395d0e6
@ -328,9 +328,13 @@ nvmf_prop_set_cc(struct nvmf_session *session, uint64_t value)
|
||||
session->vcprop.csts.bits.rdy = 1;
|
||||
}
|
||||
|
||||
if (cc.bits.shn && !session->vcprop.cc.bits.shn) {
|
||||
SPDK_TRACELOG(SPDK_TRACE_NVMF, "Property Set CC Shutdown!\n");
|
||||
if (cc.bits.shn == SPDK_NVME_SHN_NORMAL ||
|
||||
cc.bits.shn == SPDK_NVME_SHN_ABRUPT) {
|
||||
SPDK_TRACELOG(SPDK_TRACE_NVMF, "Property Set CC Shutdown %u%ub!\n",
|
||||
cc.bits.shn >> 1, cc.bits.shn & 1);
|
||||
session->vcprop.cc.bits.en = 0;
|
||||
session->vcprop.csts.bits.rdy = 0;
|
||||
session->vcprop.csts.bits.shst = SPDK_NVME_SHST_COMPLETE;
|
||||
}
|
||||
|
||||
session->vcprop.cc.raw = cc.raw;
|
||||
|
Loading…
Reference in New Issue
Block a user