diff options
-rw-r--r-- | drivers/tty/hvc/virtio_console.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/tty/hvc/virtio_console.c b/drivers/tty/hvc/virtio_console.c index 896a2ced1d27..ad2520b1e03f 100644 --- a/drivers/tty/hvc/virtio_console.c +++ b/drivers/tty/hvc/virtio_console.c | |||
@@ -1462,6 +1462,17 @@ static void control_work_handler(struct work_struct *work) | |||
1462 | spin_unlock(&portdev->cvq_lock); | 1462 | spin_unlock(&portdev->cvq_lock); |
1463 | } | 1463 | } |
1464 | 1464 | ||
1465 | static void out_intr(struct virtqueue *vq) | ||
1466 | { | ||
1467 | struct port *port; | ||
1468 | |||
1469 | port = find_port_by_vq(vq->vdev->priv, vq); | ||
1470 | if (!port) | ||
1471 | return; | ||
1472 | |||
1473 | wake_up_interruptible(&port->waitqueue); | ||
1474 | } | ||
1475 | |||
1465 | static void in_intr(struct virtqueue *vq) | 1476 | static void in_intr(struct virtqueue *vq) |
1466 | { | 1477 | { |
1467 | struct port *port; | 1478 | struct port *port; |
@@ -1566,7 +1577,7 @@ static int init_vqs(struct ports_device *portdev) | |||
1566 | */ | 1577 | */ |
1567 | j = 0; | 1578 | j = 0; |
1568 | io_callbacks[j] = in_intr; | 1579 | io_callbacks[j] = in_intr; |
1569 | io_callbacks[j + 1] = NULL; | 1580 | io_callbacks[j + 1] = out_intr; |
1570 | io_names[j] = "input"; | 1581 | io_names[j] = "input"; |
1571 | io_names[j + 1] = "output"; | 1582 | io_names[j + 1] = "output"; |
1572 | j += 2; | 1583 | j += 2; |
@@ -1580,7 +1591,7 @@ static int init_vqs(struct ports_device *portdev) | |||
1580 | for (i = 1; i < nr_ports; i++) { | 1591 | for (i = 1; i < nr_ports; i++) { |
1581 | j += 2; | 1592 | j += 2; |
1582 | io_callbacks[j] = in_intr; | 1593 | io_callbacks[j] = in_intr; |
1583 | io_callbacks[j + 1] = NULL; | 1594 | io_callbacks[j + 1] = out_intr; |
1584 | io_names[j] = "input"; | 1595 | io_names[j] = "input"; |
1585 | io_names[j + 1] = "output"; | 1596 | io_names[j + 1] = "output"; |
1586 | } | 1597 | } |