From: Amit Shah Date: Thu, 2 Sep 2010 13:17:54 +0000 (+0530) Subject: virtio: console: Send SIGIO in case of port unplug X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=a461e11e7b8ca2705889bcf9582f6a8f84884bd2;p=openwrt%2Fstaging%2Fblogic.git 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 Signed-off-by: Rusty Russell --- 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)) {