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