qemu-e2k/hw/char
Stefan Hajnoczi d4c19cdeeb virtio-serial: add missing virtio_detach_element() call
Ports enter a "throttled" state when writing to the chardev would block.
The current output VirtQueueElement is kept around until the chardev
becomes writable again.

There are several places in the virtio-serial lifecycle where the
VirtQueueElement should be thrown away.  For example, if the virtio
device is reset then virtqueue elements are no longer valid.

This patch adds the discard_throttle_data() function to unmap the
scatter-gather list and decrement vq->inuse.  This ensures that the
VirtQueueElement is freed properly.

Cc: amit.shah@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Tested-by: Ladi Prosek <lprosek@redhat.com>
Reviewed-by: Ladi Prosek <lprosek@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2016-10-10 01:16:58 +03:00
..
bcm2835_aux.c hw: replace most use of qemu_chr_fe_write with qemu_chr_fe_write_all 2016-09-13 19:09:42 +02:00
cadence_uart.c * serial port fixes (Paolo) 2016-06-29 19:14:48 +01:00
debugcon.c hw: replace most use of qemu_chr_fe_write with qemu_chr_fe_write_all 2016-09-13 19:09:42 +02:00
digic-uart.c hw: replace most use of qemu_chr_fe_write with qemu_chr_fe_write_all 2016-09-13 19:09:42 +02:00
escc.c hw: replace most use of qemu_chr_fe_write with qemu_chr_fe_write_all 2016-09-13 19:09:42 +02:00
etraxfs_ser.c hw: replace most use of qemu_chr_fe_write with qemu_chr_fe_write_all 2016-09-13 19:09:42 +02:00
exynos4210_uart.c hw: replace most use of qemu_chr_fe_write with qemu_chr_fe_write_all 2016-09-13 19:09:42 +02:00
grlib_apbuart.c hw: replace most use of qemu_chr_fe_write with qemu_chr_fe_write_all 2016-09-13 19:09:42 +02:00
imx_serial.c hw: replace most use of qemu_chr_fe_write with qemu_chr_fe_write_all 2016-09-13 19:09:42 +02:00
ipoctal232.c hw: replace most use of qemu_chr_fe_write with qemu_chr_fe_write_all 2016-09-13 19:09:42 +02:00
lm32_juart.c hw: replace most use of qemu_chr_fe_write with qemu_chr_fe_write_all 2016-09-13 19:09:42 +02:00
lm32_uart.c hw: replace most use of qemu_chr_fe_write with qemu_chr_fe_write_all 2016-09-13 19:09:42 +02:00
Makefile.objs
mcf_uart.c hw: replace most use of qemu_chr_fe_write with qemu_chr_fe_write_all 2016-09-13 19:09:42 +02:00
milkymist-uart.c
omap_uart.c
parallel.c hw: replace most use of qemu_chr_fe_write with qemu_chr_fe_write_all 2016-09-13 19:09:42 +02:00
pl011.c hw: replace most use of qemu_chr_fe_write with qemu_chr_fe_write_all 2016-09-13 19:09:42 +02:00
sclpconsole-lm.c hw: replace most use of qemu_chr_fe_write with qemu_chr_fe_write_all 2016-09-13 19:09:42 +02:00
sclpconsole.c hw: replace most use of qemu_chr_fe_write with qemu_chr_fe_write_all 2016-09-13 19:09:42 +02:00
serial-isa.c
serial-pci.c
serial.c serial: reinstate watch after migration 2016-06-29 14:03:47 +02:00
sh_serial.c hw: replace most use of qemu_chr_fe_write with qemu_chr_fe_write_all 2016-09-13 19:09:42 +02:00
spapr_vty.c hw: replace most use of qemu_chr_fe_write with qemu_chr_fe_write_all 2016-09-13 19:09:42 +02:00
stm32f2xx_usart.c hw: replace most use of qemu_chr_fe_write with qemu_chr_fe_write_all 2016-09-13 19:09:42 +02:00
trace-events trace-events: fix first line comment in trace-events 2016-08-12 10:36:01 +01:00
virtio-console.c hw: replace most use of qemu_chr_fe_write with qemu_chr_fe_write_all 2016-09-13 19:09:42 +02:00
virtio-serial-bus.c virtio-serial: add missing virtio_detach_element() call 2016-10-10 01:16:58 +03:00
xen_console.c
xilinx_uartlite.c hw: replace most use of qemu_chr_fe_write with qemu_chr_fe_write_all 2016-09-13 19:09:42 +02:00