summaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorAmit Shah <amit.shah@redhat.com>2010-05-20 06:15:47 +0200
committerRusty Russell <rusty@rustcorp.com.au>2010-05-19 14:45:48 +0200
commit69eb9a9f69572c0ebe08a0a46f56bdfdcdaa19a0 (patch)
tree703a249a72b7f7a9bd53cf769b519701e39d9cbe /drivers/char
parentvirtio: console: Return -EPIPE to hvc_console if we lost the connection (diff)
downloadlinux-69eb9a9f69572c0ebe08a0a46f56bdfdcdaa19a0.tar.xz
linux-69eb9a9f69572c0ebe08a0a46f56bdfdcdaa19a0.zip
virtio: console: Don't call hvc_remove() on unplugging console ports
hvc_remove() has some bug which freezes other active hvc ports when one port is removed. So disable calling of hvc_remove() which deregisters a port with the hvc_console. If the hvc_console code calls into our get_chars() routine as a result of a poll operation, we will return -EPIPE and the hvc_console code will then do the necessary cleanup. This call will be restored when the bug in hvc_remove() is found and fixed. Signed-off-by: Amit Shah <amit.shah@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/virtio_console.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index 11a9573f901e..9a698707e14b 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -869,7 +869,18 @@ static int remove_port(struct port *port)
spin_lock_irq(&pdrvdata_lock);
list_del(&port->cons.list);
spin_unlock_irq(&pdrvdata_lock);
+#if 0
+ /*
+ * hvc_remove() not called as removing one hvc port
+ * results in other hvc ports getting frozen.
+ *
+ * Once this is resolved in hvc, this functionality
+ * will be enabled. Till that is done, the -EPIPE
+ * return from get_chars() above will help
+ * hvc_console.c to clean up on ports we remove here.
+ */
hvc_remove(port->cons.hvc);
+#endif
}
if (port->guest_connected)
send_control_msg(port, VIRTIO_CONSOLE_PORT_OPEN, 0);