]> git.proxmox.com Git - qemu.git/commitdiff
virtio-serial: Don't clear ->have_data() pointer after unplug
authorAmit Shah <amit.shah@redhat.com>
Thu, 3 Mar 2011 07:59:45 +0000 (13:29 +0530)
committerAmit Shah <amit.shah@redhat.com>
Mon, 21 Mar 2011 11:25:12 +0000 (16:55 +0530)
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 <juzhang@redhat.com>
Signed-off-by: Amit Shah <amit.shah@redhat.com>
hw/virtio-console.c

index 444078463792b60cc807ba572a5d35c784ba419a..be5955868f5c759cac0b8364f95331f541baff47 100644 (file)
@@ -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);
     }