diff options
author | Klaus Jensen <k.jensen@samsung.com> | 2022-05-06 00:21:47 +0200 |
---|---|---|
committer | Klaus Jensen <k.jensen@samsung.com> | 2022-06-03 21:48:24 +0200 |
commit | 9235a72a5df0fae1ede89f02717b597ef91cf6ad (patch) | |
tree | 2ec0bcc9c48602189c2a8d6b4a7147e88db7b378 /hw/nvme/ctrl.c | |
parent | 2e8f952ae7de23b4847937dbbf51f7a1ab10a2af (diff) |
hw/nvme: fix smart aen
Pass the right constant to nvme_smart_event(). The NVME_AER* values hold
the bit position in the SMART byte, not the shifted value that we expect
it to be in nvme_smart_event().
Fixes: c62720f137df ("hw/block/nvme: trigger async event during injecting smart warning")
Acked-by: zhenwei pi <pizhenwei@bytedance.com>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Diffstat (limited to 'hw/nvme/ctrl.c')
-rw-r--r-- | hw/nvme/ctrl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c index 08574c4dcb..a2f6069f7f 100644 --- a/hw/nvme/ctrl.c +++ b/hw/nvme/ctrl.c @@ -5325,7 +5325,7 @@ static uint16_t nvme_set_feature(NvmeCtrl *n, NvmeRequest *req) if ((n->temperature >= n->features.temp_thresh_hi) || (n->temperature <= n->features.temp_thresh_low)) { - nvme_smart_event(n, NVME_AER_INFO_SMART_TEMP_THRESH); + nvme_smart_event(n, NVME_SMART_TEMPERATURE); } break; |