mirror of https://github.com/xemu-project/xemu.git
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: c62720f137
("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>
This commit is contained in:
parent
2e8f952ae7
commit
9235a72a5d
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue