git: 34a6ad848fbf - main - nvme: Don't use version to listen for events for ns and fw changes
Date: Sat, 18 Nov 2023 04:32:03 UTC
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=34a6ad848fbf471773a430a7e457bf49816e756e commit 34a6ad848fbf471773a430a7e457bf49816e756e Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2023-11-18 04:24:00 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2023-11-18 04:25:57 +0000 nvme: Don't use version to listen for events for ns and fw changes Instead, use the attribtue bits from the identification data to determine if we should listen to namespace changes and firmware activation. Should have no functional change, though we may stop listening for events that will never happen. Sponsored by: Netflix --- sys/dev/nvme/nvme_ctrlr.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c index 5d72f707d3b1..836d13eaa16d 100644 --- a/sys/dev/nvme/nvme_ctrlr.c +++ b/sys/dev/nvme/nvme_ctrlr.c @@ -826,8 +826,9 @@ nvme_ctrlr_configure_aer(struct nvme_controller *ctrlr) NVME_CRIT_WARN_ST_READ_ONLY | NVME_CRIT_WARN_ST_VOLATILE_MEMORY_BACKUP; if (ctrlr->cdata.ver >= NVME_REV(1, 2)) - ctrlr->async_event_config |= NVME_ASYNC_EVENT_NS_ATTRIBUTE | - NVME_ASYNC_EVENT_FW_ACTIVATE; + ctrlr->async_event_config |= + ctrlr->cdata.oaes & (NVME_ASYNC_EVENT_NS_ATTRIBUTE | + NVME_ASYNC_EVENT_FW_ACTIVATE); status.done = 0; nvme_ctrlr_cmd_get_feature(ctrlr, NVME_FEAT_TEMPERATURE_THRESHOLD,