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: Gonglei (Arei)
Subject: Re: [Qemu-devel] [PATCH v2] ps2: set ps/2 output buffer size as the same as kernel
Date: Thu, 24 Apr 2014 11:43:32 +0000

Hi, Gerd.
> 
> >      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)"
> 
"while (s->common.queue.count < PS2_QUEUE_SIZE - 4)" looks more better IMHO.
Accepting it into v3. Thanks.


Best regards,
-Gonglei


reply via email to

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