[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v4 03/12] ps2: don't deassert irq twice if queue is empty
From: |
Volker Rümelin |
Subject: |
[PATCH v4 03/12] ps2: don't deassert irq twice if queue is empty |
Date: |
Tue, 25 May 2021 20:14:32 +0200 |
Don't deassert the irq twice if the queue is empty. While the
second deassertion doesn't do any harm, it's unnecessary.
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
---
hw/input/ps2.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/hw/input/ps2.c b/hw/input/ps2.c
index 55a81a0c51..4aee46a595 100644
--- a/hw/input/ps2.c
+++ b/hw/input/ps2.c
@@ -519,7 +519,9 @@ uint32_t ps2_read_data(PS2State *s)
/* reading deasserts IRQ */
s->update_irq(s->update_arg, 0);
/* reassert IRQs if data left */
- s->update_irq(s->update_arg, q->count != 0);
+ if (q->count) {
+ s->update_irq(s->update_arg, 1);
+ }
}
return val;
}
--
2.26.2
- [PATCH v4 00/12] PS/2 controller related fixes, Volker Rümelin, 2021/05/25
- [PATCH v4 02/12] ps2: don't raise an interrupt if queue is full, Volker Rümelin, 2021/05/25
- [PATCH v4 01/12] ps2: fix mouse stream corruption, Volker Rümelin, 2021/05/25
- [PATCH v4 03/12] ps2: don't deassert irq twice if queue is empty,
Volker Rümelin <=
- [PATCH v4 04/12] pckbd: split out interrupt line changing code, Volker Rümelin, 2021/05/25
- [PATCH v4 07/12] pckbd: add state variable for interrupt source, Volker Rümelin, 2021/05/25
- [PATCH v4 09/12] pckbd: add function kbd_pending(), Volker Rümelin, 2021/05/25
- [PATCH v4 08/12] pckbd: add controller response queue, Volker Rümelin, 2021/05/25
- [PATCH v4 06/12] pckbd: PS/2 keyboard throttle, Volker Rümelin, 2021/05/25
- [PATCH v4 05/12] pckbd: don't update OBF flags if KBD_STAT_OBF is set, Volker Rümelin, 2021/05/25
- [PATCH v4 12/12] pckbd: clear outport_present in outer pre_load(), Volker Rümelin, 2021/05/25
- [PATCH v4 10/12] pckbd: correctly disable PS/2 communication, Volker Rümelin, 2021/05/25
- [PATCH v4 11/12] pckbd: remove duplicated keyboard and mouse defines, Volker Rümelin, 2021/05/25