qemu-patch-raspberry4/backends
Gerd Hoffmann 57a4e3b92b msmouse: fix buffer handling
The msmouse chardev backend writes data without checking whenever there
is enough space.

That happens to work with linux guests, probably by pure luck because
the linux driver enables the fifo and the serial port emulation accepts
more data than announced via qemu_chr_be_can_write() in that case.

Handle this properly by adding a buffer to MouseState.  Hook up a
CharDriverState->accept_input() handler which feeds the buffer to the
serial port.  msmouse_event() only fills the buffer now, and calls the
accept_input handler too to kick off the transmission.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Message-id: 1467625375-31774-3-git-send-email-kraxel@redhat.com
2016-07-12 09:24:31 +02:00
..
baum.c Replaced get_tick_per_sec() by NANOSECONDS_PER_SECOND 2016-03-22 22:20:17 +01:00
hostmem-file.c hostmem-file: plug a small leak 2016-04-15 17:56:06 +02:00
hostmem-ram.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
hostmem.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
Makefile.objs backends: Introduce chr-testdev 2014-08-06 17:53:05 +02:00
msmouse.c msmouse: fix buffer handling 2016-07-12 09:24:31 +02:00
rng-egd.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
rng-random.c rng-random: rename RndRandom to RngRandom 2016-05-23 12:18:43 +05:30
rng.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
testdev.c backends: Clean up includes 2016-02-04 17:01:04 +00:00
tpm.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00