aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorSjur Brændeland <sjur.brandeland@stericsson.com>2013-02-13 05:27:21 -0500
committerRusty Russell <rusty@rustcorp.com.au>2013-02-13 05:27:45 -0500
commit8078db789a92b10ff6e2d713231b5367e014c53b (patch)
tree44009aa63f70e235ce4674abba9ff1333da7c8fd /drivers/char
parentb2a17029c29bb6f7dec580feffa715b9fcf51e42 (diff)
virtio_console: Initialize guest_connected=true for rproc_serial
When rproc_serial is initialized, guest_connected should be set to true. We can then revert the extra checks introduced in commit: "virtio_console: Let unconnected rproc device receive data." Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/virtio_console.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index 2cfd5a0575ab..5afc8f614b1c 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -1436,7 +1436,7 @@ static int add_port(struct ports_device *portdev, u32 id)
1436 * rproc_serial does not want the console port, only 1436 * rproc_serial does not want the console port, only
1437 * the generic port implementation. 1437 * the generic port implementation.
1438 */ 1438 */
1439 port->host_connected = true; 1439 port->host_connected = port->guest_connected = true;
1440 else if (!use_multiport(port->portdev)) { 1440 else if (!use_multiport(port->portdev)) {
1441 /* 1441 /*
1442 * If we're not using multiport support, 1442 * If we're not using multiport support,
@@ -1757,11 +1757,8 @@ static void in_intr(struct virtqueue *vq)
1757 * tty is spawned) and the host sends out data to console 1757 * tty is spawned) and the host sends out data to console
1758 * ports. For generic serial ports, the host won't 1758 * ports. For generic serial ports, the host won't
1759 * (shouldn't) send data till the guest is connected. 1759 * (shouldn't) send data till the guest is connected.
1760 * However a remote device might send data before the port is
1761 * connected. So don't remove data from a rproc_serial device.
1762 */ 1760 */
1763 1761 if (!port->guest_connected)
1764 if (!port->guest_connected && !is_rproc_serial(port->portdev->vdev))
1765 discard_port_data(port); 1762 discard_port_data(port);
1766 1763
1767 spin_unlock_irqrestore(&port->inbuf_lock, flags); 1764 spin_unlock_irqrestore(&port->inbuf_lock, flags);