From: Amit Shah Date: Thu, 3 Mar 2011 07:59:45 +0000 (+0530) Subject: virtio-serial: Don't clear ->have_data() pointer after unplug X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=fee063c07f20b442ef4bedef834ab0a3bf55b562;p=qemu.git virtio-serial: Don't clear ->have_data() pointer after unplug After a port unplug operation, the port->info->have_data() pointer was set to NULL. The problem is, the ->info struct is shared by all ports, effectively disabling writes to other ports. Reported-by: juzhang Signed-off-by: Amit Shah --- diff --git a/hw/virtio-console.c b/hw/virtio-console.c index 4440784637..be5955868f 100644 --- a/hw/virtio-console.c +++ b/hw/virtio-console.c @@ -82,7 +82,6 @@ static int virtconsole_exitfn(VirtIOSerialPort *port) VirtConsole *vcon = DO_UPCAST(VirtConsole, port, port); if (vcon->chr) { - port->info->have_data = NULL; qemu_chr_close(vcon->chr); }