mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
hw/nvme: clear masked events from the aer queue
Clear masked events from the aer queue when get log page is issued with RAE 0 without checking for the presence of outstanding aer requests. Signed-off-by: Arun Kumar <arun.kka@samsung.com> [k.jensen: remove unnecessary QTAILQ_EMPTY check] Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
This commit is contained in:
parent
78ca36df42
commit
16eb2ea8ff
1 changed files with 9 additions and 2 deletions
|
@ -1649,9 +1649,16 @@ static void nvme_smart_event(NvmeCtrl *n, uint8_t event)
|
|||
|
||||
static void nvme_clear_events(NvmeCtrl *n, uint8_t event_type)
|
||||
{
|
||||
NvmeAsyncEvent *event, *next;
|
||||
|
||||
n->aer_mask &= ~(1 << event_type);
|
||||
if (!QTAILQ_EMPTY(&n->aer_queue)) {
|
||||
nvme_process_aers(n);
|
||||
|
||||
QTAILQ_FOREACH_SAFE(event, &n->aer_queue, entry, next) {
|
||||
if (event->result.event_type == event_type) {
|
||||
QTAILQ_REMOVE(&n->aer_queue, event, entry);
|
||||
n->aer_queued--;
|
||||
g_free(event);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue