[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 02/11] ps2: don't raise an interrupt if queue is full
From: |
Volker Rümelin |
Subject: |
[PATCH v2 02/11] ps2: don't raise an interrupt if queue is full |
Date: |
Fri, 7 May 2021 20:09:44 +0200 |
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>
---
hw/input/ps2.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/hw/input/ps2.c b/hw/input/ps2.c
index d9f79e8260..55a81a0c51 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.26.2
- [PATCH v2 00/11] PS/2 controller related fixes, Volker Rümelin, 2021/05/07
- [PATCH v2 05/11] pckbd: don't update OBF flags if KBD_STAT_OBF is set, Volker Rümelin, 2021/05/07
- [PATCH v2 06/11] pckbd: PS/2 keyboard throttle, Volker Rümelin, 2021/05/07
- [PATCH v2 02/11] ps2: don't raise an interrupt if queue is full,
Volker Rümelin <=
- [PATCH v2 04/11] pckbd: split out interrupt line changing code, Volker Rümelin, 2021/05/07
- [PATCH v2 03/11] ps2: don't deassert irq twice if queue is empty, Volker Rümelin, 2021/05/07
- [PATCH v2 07/11] pckbd: add state variable for interrupt source, Volker Rümelin, 2021/05/07
- [PATCH v2 11/11] pckbd: remove duplicated keyboard and mouse defines, Volker Rümelin, 2021/05/07
- [PATCH v2 08/11] pckbd: add controller response queue, Volker Rümelin, 2021/05/07
- [PATCH v2 01/11] ps2: fix mouse stream corruption, Volker Rümelin, 2021/05/07
- [PATCH v2 10/11] pckbd: correctly disable PS/2 communication, Volker Rümelin, 2021/05/07
- [PATCH v2 09/11] pckbd: add function kbd_pending(), Volker Rümelin, 2021/05/07
- Re: [PATCH v2 00/11] PS/2 controller related fixes, Volker Rümelin, 2021/05/09