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