summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSjur Brændeland <sjur.brandeland@stericsson.com>2013-01-22 09:51:20 +1030
committerRusty Russell <rusty@rustcorp.com.au>2013-01-22 17:28:40 +1030
commit1f8051876a194d7f7fe7834d9853f240d6b4b9ab (patch)
tree1aa4b9823fb30f308075429e5fd08253216e3adb
parent226364766f936d249e408de03821468c1bf11dda (diff)
downloadlinux-1f8051876a194d7f7fe7834d9853f240d6b4b9ab.tar.bz2
virtio_console: Let unconnected rproc device receive data.
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 <sjur.brandeland@stericsson.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
-rw-r--r--drivers/char/virtio_console.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index 684b0d53764f..95cae778bd73 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);