qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2] ps2: set ps/2 output buffer size as the same


From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH v2] ps2: set ps/2 output buffer size as the same as kernel
Date: Thu, 24 Apr 2014 13:15:48 +0200

  Hi,

>      if (!(s->mouse_status & MOUSE_STATUS_REMOTE) &&
> -        (s->common.queue.count < (PS2_QUEUE_SIZE - 16))) {
> +        (s->common.queue.count < PS2_QUEUE_SIZE - 4)) {
>          for(;;) {

Almost there.

The check for enougth space in the queue should be for every
ps2_mouse_send_packet() call, either by moving the check into that
function (and change return value as discussed in the other mail), or by
checking for each loop pass, for example by replacing the "for (;;)"
with "while (s->common.queue.count < PS2_QUEUE_SIZE - 4)"

Otherwise the patch looks fine now.

cheers,
  Gerd





reply via email to

[Prev in Thread] Current Thread [Next in Thread]