nvme: set AER bit for discovery controllers
We will actually run the CONFIGURE_AER state for discovery controllers in a future patch. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: Ib114beb886ab4b9214e4525479eb5ec7e038e5d9 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10331 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com>
This commit is contained in:
parent
b067cba8a3
commit
b962b6bee5
@ -3238,25 +3238,30 @@ nvme_ctrlr_configure_aer(struct spdk_nvme_ctrlr *ctrlr)
|
||||
int rc;
|
||||
|
||||
config.raw = 0;
|
||||
config.bits.crit_warn.bits.available_spare = 1;
|
||||
config.bits.crit_warn.bits.temperature = 1;
|
||||
config.bits.crit_warn.bits.device_reliability = 1;
|
||||
config.bits.crit_warn.bits.read_only = 1;
|
||||
config.bits.crit_warn.bits.volatile_memory_backup = 1;
|
||||
|
||||
if (ctrlr->vs.raw >= SPDK_NVME_VERSION(1, 2, 0)) {
|
||||
if (ctrlr->cdata.oaes.ns_attribute_notices) {
|
||||
config.bits.ns_attr_notice = 1;
|
||||
if (spdk_nvme_ctrlr_is_discovery(ctrlr)) {
|
||||
config.bits.discovery_log_change_notice = 1;
|
||||
} else {
|
||||
config.bits.crit_warn.bits.available_spare = 1;
|
||||
config.bits.crit_warn.bits.temperature = 1;
|
||||
config.bits.crit_warn.bits.device_reliability = 1;
|
||||
config.bits.crit_warn.bits.read_only = 1;
|
||||
config.bits.crit_warn.bits.volatile_memory_backup = 1;
|
||||
|
||||
if (ctrlr->vs.raw >= SPDK_NVME_VERSION(1, 2, 0)) {
|
||||
if (ctrlr->cdata.oaes.ns_attribute_notices) {
|
||||
config.bits.ns_attr_notice = 1;
|
||||
}
|
||||
if (ctrlr->cdata.oaes.fw_activation_notices) {
|
||||
config.bits.fw_activation_notice = 1;
|
||||
}
|
||||
if (ctrlr->cdata.oaes.ana_change_notices) {
|
||||
config.bits.ana_change_notice = 1;
|
||||
}
|
||||
}
|
||||
if (ctrlr->cdata.oaes.fw_activation_notices) {
|
||||
config.bits.fw_activation_notice = 1;
|
||||
if (ctrlr->vs.raw >= SPDK_NVME_VERSION(1, 3, 0) && ctrlr->cdata.lpa.telemetry) {
|
||||
config.bits.telemetry_log_notice = 1;
|
||||
}
|
||||
if (ctrlr->cdata.oaes.ana_change_notices) {
|
||||
config.bits.ana_change_notice = 1;
|
||||
}
|
||||
}
|
||||
if (ctrlr->vs.raw >= SPDK_NVME_VERSION(1, 3, 0) && ctrlr->cdata.lpa.telemetry) {
|
||||
config.bits.telemetry_log_notice = 1;
|
||||
}
|
||||
|
||||
nvme_ctrlr_set_state(ctrlr, NVME_CTRLR_STATE_WAIT_FOR_CONFIGURE_AER,
|
||||
|
Loading…
Reference in New Issue
Block a user