summaryrefslogtreecommitdiff
path: root/drivers/char
diff options
context:
space:
mode:
authorAmit Shah <amit.shah@redhat.com>2010-09-02 17:17:54 +0400
committerRusty Russell <rusty@rustcorp.com.au>2010-10-21 11:14:04 +0400
commita461e11e7b8ca2705889bcf9582f6a8f84884bd2 (patch)
tree030d009c2b8945babcde091bbdd059e54b9c2de9 /drivers/char
parent55f6bcce3691f68476a530daa6666b66c43420a8 (diff)
downloadlinux-a461e11e7b8ca2705889bcf9582f6a8f84884bd2.tar.xz
virtio: console: Send SIGIO in case of port unplug
If a port has registered for SIGIO signals, let the application know that the port is getting unplugged. 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.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index 6d5c579b1693..dc42d5689483 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -1259,6 +1259,9 @@ static void unplug_port(struct port *port)
port->guest_connected = false;
port->host_connected = false;
wake_up_interruptible(&port->waitqueue);
+
+ /* Let the app know the port is going down. */
+ send_sigio_to_port(port);
}
if (is_console_port(port)) {