From: "Volker Rümelin" <vr_qemu@t-online.de>
To: "Michael S. Tsirkin" <mst@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: [PATCH v3 03/11] ps2: don't deassert irq twice if queue is empty
Date: Sat, 15 May 2021 13:32:46 +0200 [thread overview]
Message-ID: <20210515113254.6245-3-vr_qemu@t-online.de> (raw)
In-Reply-To: <d00ea6b1-43c7-78a2-8c0a-35e19efb5e46@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>
---
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
next prev parent reply other threads:[~2021-05-15 11:37 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-15 11:31 [PATCH v3 00/11] PS/2 controller related fixes Volker Rümelin
2021-05-15 11:32 ` [PATCH v3 01/11] ps2: fix mouse stream corruption Volker Rümelin
2021-05-15 11:32 ` [PATCH v3 02/11] ps2: don't raise an interrupt if queue is full Volker Rümelin
2021-05-15 11:32 ` Volker Rümelin [this message]
2021-05-15 11:32 ` [PATCH v3 04/11] pckbd: split out interrupt line changing code Volker Rümelin
2021-05-15 11:32 ` [PATCH v3 05/11] pckbd: don't update OBF flags if KBD_STAT_OBF is set Volker Rümelin
2021-05-18 10:49 ` Gerd Hoffmann
2021-05-18 19:37 ` Volker Rümelin
2021-05-15 11:32 ` [PATCH v3 06/11] pckbd: PS/2 keyboard throttle Volker Rümelin
2021-05-15 11:32 ` [PATCH v3 07/11] pckbd: add state variable for interrupt source Volker Rümelin
2021-05-15 11:32 ` [PATCH v3 08/11] pckbd: add controller response queue Volker Rümelin
2021-05-15 11:32 ` [PATCH v3 09/11] pckbd: add function kbd_pending() Volker Rümelin
2021-05-15 11:32 ` [PATCH v3 10/11] pckbd: correctly disable PS/2 communication Volker Rümelin
2021-05-15 11:32 ` [PATCH v3 11/11] pckbd: remove duplicated keyboard and mouse defines Volker Rümelin
2021-05-15 12:05 ` [PATCH v3 00/11] PS/2 controller related fixes Philippe Mathieu-Daudé
2021-05-15 14:35 ` BALATON Zoltan
2021-05-15 16:33 ` Philippe Mathieu-Daudé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210515113254.6245-3-vr_qemu@t-online.de \
--to=vr_qemu@t-online.de \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).