Hi,
> Move the check into ps2_mouse_send_packet() is not a good idea.
> In that case, we cannot break the for loop except we change the return value
> of ps2_mouse_send_packet().
Changing the return value is fine IMO.
cheers,
Gerd
Hi, Gerd.
> > if (!(s->mouse_status & MOUSE_STATUS_REMOTE) &&
> > -(s->common.queue.count < (PS2_QUEUE_SIZE - 16))) {
> > +(s->common.queue.count < PS2_QUEUE_SIZE)) {
>
> To me this looks like an attempt to make sure the queue has enough space
> for the whole mouse message.
> Hi,
>
> > Move the check into ps2_mouse_send_packet() is not a good idea.
> > In that case, we cannot break the for loop except we change the return value
> > of ps2_mouse_send_packet().
>
> Changing the return value is fine IMO.
>
OK. Change it in v3. Could you review the v2 about other cod
> Subject: Re: [PATCH] ps2: set ps/2 output buffer size as the same as kernel
>
> > @@ -137,7 +139,7 @@ void ps2_queue(void *opaque, int b)
> > PS2State *s = (PS2State *)opaque;
> > PS2Queue *q = &s->queue;
> >
> > -if (q->count >= PS2_QUEUE_SIZE)
> > +if (q->count >= PS2_QUEUE_S
> @@ -137,7 +139,7 @@ void ps2_queue(void *opaque, int b)
> PS2State *s = (PS2State *)opaque;
> PS2Queue *q = &s->queue;
>
> -if (q->count >= PS2_QUEUE_SIZE)
> +if (q->count >= PS2_QUEUE_SIZE - 1)
Why?
> if (!(s->mouse_status & MOUSE_STATUS_REMOTE) &&
> -(s->commo
From: Gonglei
According to the PS/2 Mouse/Keyboard Protocol, the keyboard outupt buffer size
is 16 bytes. And the PS2_QUEUE_SIZE 256 was introduced in Qemu from the very
beginning.
When I started a redhat5.6 32bit guest, meanwhile tapped the keyboard as
quickly as
possible, the screen would sh