[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 03/14] ps2: don't raise an interrupt if queue is full
From: |
Gerd Hoffmann |
Subject: |
[PULL 03/14] ps2: don't raise an interrupt if queue is full |
Date: |
Wed, 26 May 2021 16:06:16 +0200 |
From: Volker Rümelin <vr_qemu@t-online.de>
ps2_queue() behaves differently than the very similar functions
ps2_queue_2() to ps2_queue_4(). The first one calls update_irq()
even if the queue is full, the others don't. Change ps2_queue()
to be consistent with the others.
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: Volker Rümelin <vr_qemu@t-online.de>
Message-Id: <20210525181441.27768-2-vr_qemu@t-online.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/input/ps2.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/hw/input/ps2.c b/hw/input/ps2.c
index 7a3fb2b9f639..7c7a158e3139 100644
--- a/hw/input/ps2.c
+++ b/hw/input/ps2.c
@@ -212,6 +212,10 @@ void ps2_raise_irq(PS2State *s)
void ps2_queue(PS2State *s, int b)
{
+ if (PS2_QUEUE_SIZE - s->queue.count < 1) {
+ return;
+ }
+
ps2_queue_noirq(s, b);
s->update_irq(s->update_arg, 1);
}
--
2.31.1
- [PULL 00/14] Input 20210526 patches, Gerd Hoffmann, 2021/05/26
- [PULL 01/14] hw/input: expand trace info reported for ps2 device, Gerd Hoffmann, 2021/05/26
- [PULL 02/14] ps2: fix mouse stream corruption, Gerd Hoffmann, 2021/05/26
- [PULL 03/14] ps2: don't raise an interrupt if queue is full,
Gerd Hoffmann <=
- [PULL 05/14] pckbd: split out interrupt line changing code, Gerd Hoffmann, 2021/05/26
- [PULL 04/14] ps2: don't deassert irq twice if queue is empty, Gerd Hoffmann, 2021/05/26
- [PULL 06/14] pckbd: don't update OBF flags if KBD_STAT_OBF is set, Gerd Hoffmann, 2021/05/26
- [PULL 07/14] pckbd: PS/2 keyboard throttle, Gerd Hoffmann, 2021/05/26
- [PULL 09/14] pckbd: add controller response queue, Gerd Hoffmann, 2021/05/26
- [PULL 08/14] pckbd: add state variable for interrupt source, Gerd Hoffmann, 2021/05/26
- [PULL 11/14] pckbd: correctly disable PS/2 communication, Gerd Hoffmann, 2021/05/26
- [PULL 10/14] pckbd: add function kbd_pending(), Gerd Hoffmann, 2021/05/26
- [PULL 13/14] pckbd: clear outport_present in outer pre_load(), Gerd Hoffmann, 2021/05/26
- [PULL 12/14] pckbd: remove duplicated keyboard and mouse defines, Gerd Hoffmann, 2021/05/26