From 1f8051876a194d7f7fe7834d9853f240d6b4b9ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sjur=20Br=C3=A6ndeland?= Date: Tue, 22 Jan 2013 09:51:20 +1030 Subject: virtio_console: Let unconnected rproc device receive data. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Allow rproc serial ports to receive data before the port is connected. Rproc serial ports usually talk to very simple remote devices with no control queue managing open/close events. So we must let remote devices write to the virtio ring even if the device is not yet fully initialized. Signed-off-by: Sjur Brændeland Signed-off-by: Rusty Russell --- drivers/char/virtio_console.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'drivers/char/virtio_console.c') diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c index 684b0d5..95cae77 100644 --- a/drivers/char/virtio_console.c +++ b/drivers/char/virtio_console.c @@ -1763,8 +1763,11 @@ static void in_intr(struct virtqueue *vq) * tty is spawned) and the host sends out data to console * ports. For generic serial ports, the host won't * (shouldn't) send data till the guest is connected. + * However a remote device might send data before the port is + * connected. So don't remove data from a rproc_serial device. */ - if (!port->guest_connected) + + if (!port->guest_connected && !is_rproc_serial(port->portdev->vdev)) discard_port_data(port); spin_unlock_irqrestore(&port->inbuf_lock, flags); -- cgit v1.1