nvme: check CSTS.CFS when initializing ctrlrs
If Controller Fatal Status (CFS) bit is set, there's no point in waiting for CSTS.RDY and the only way to move forward with the initialization is to perform a controller reset. This fixes issues with test/nvme/sw_hotplug.sh when running under qemu. It seems that during that test, qemu marks the emulated NVMe drives as fatal, so if we didn't check CSTS.CFS, the initialization would time out. Fixes #2201. Signed-off-by: Konrad Sztyber <konrad.sztyber@intel.com> Change-Id: I97712debc80c3dd6199545d393c0f340f29d33b2 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13820 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Michal Berger <michal.berger@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
parent
78ca4b27c5
commit
a818564374
@ -3641,7 +3641,7 @@ nvme_ctrlr_process_init_wait_for_ready_1(void *ctx, uint64_t value, const struct
|
||||
|
||||
assert(value <= UINT32_MAX);
|
||||
csts.raw = (uint32_t)value;
|
||||
if (csts.bits.rdy == 1) {
|
||||
if (csts.bits.rdy == 1 || csts.bits.cfs == 1) {
|
||||
nvme_ctrlr_set_state(ctrlr, NVME_CTRLR_STATE_SET_EN_0,
|
||||
nvme_ctrlr_get_ready_timeout(ctrlr));
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user