Skip to content

Commit

Permalink
ps2: don't raise an interrupt if queue is full
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Volker Rümelin authored and kraxel committed May 26, 2021
1 parent 7696810 commit 7704bb0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions hw/input/ps2.c
Expand Up @@ -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);
}
Expand Down

0 comments on commit 7704bb0

Please sign in to comment.