[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 04/14] ps2: don't deassert irq twice if queue is empty
From: |
Gerd Hoffmann |
Subject: |
[PULL 04/14] ps2: don't deassert irq twice if queue is empty |
Date: |
Wed, 26 May 2021 16:06:17 +0200 |
From: Volker Rümelin <vr_qemu@t-online.de>
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>
Message-Id: <20210525181441.27768-3-vr_qemu@t-online.de>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
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 7c7a158e3139..5cf95b4dd3eb 100644
--- a/hw/input/ps2.c
+++ b/hw/input/ps2.c
@@ -520,7 +520,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.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, 2021/05/26
- [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 <=
- [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
- [PULL 14/14] hw/input/ps2: Use ps2_raise_irq() instead of open coding it, Gerd Hoffmann, 2021/05/26
- Re: [PULL 00/14] Input 20210526 patches, Peter Maydell, 2021/05/26