aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/virtio_console.c
diff options
context:
space:
mode:
authorJeremy Erickson <jerickso@cs.unc.edu>2014-04-18 17:06:00 -0400
committerJeremy Erickson <jerickso@cs.unc.edu>2014-04-18 17:06:00 -0400
commita215aa7b9ab3759c047201199fba64d3042d7f13 (patch)
treebca37493d9b2233450e6d3ffced1261d0e4f71fe /drivers/char/virtio_console.c
parentd31199a77ef606f1d06894385f1852181ba6136b (diff)
Update 2.6.36 to 2.6.36.4wip-dissipation2-jerickso
Diffstat (limited to 'drivers/char/virtio_console.c')
-rw-r--r--drivers/char/virtio_console.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index 0f69c5ec0ecd..7dc855b074d3 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -1314,6 +1314,17 @@ static void control_work_handler(struct work_struct *work)
1314 spin_unlock(&portdev->cvq_lock); 1314 spin_unlock(&portdev->cvq_lock);
1315} 1315}
1316 1316
1317static void out_intr(struct virtqueue *vq)
1318{
1319 struct port *port;
1320
1321 port = find_port_by_vq(vq->vdev->priv, vq);
1322 if (!port)
1323 return;
1324
1325 wake_up_interruptible(&port->waitqueue);
1326}
1327
1317static void in_intr(struct virtqueue *vq) 1328static void in_intr(struct virtqueue *vq)
1318{ 1329{
1319 struct port *port; 1330 struct port *port;
@@ -1430,7 +1441,7 @@ static int init_vqs(struct ports_device *portdev)
1430 */ 1441 */
1431 j = 0; 1442 j = 0;
1432 io_callbacks[j] = in_intr; 1443 io_callbacks[j] = in_intr;
1433 io_callbacks[j + 1] = NULL; 1444 io_callbacks[j + 1] = out_intr;
1434 io_names[j] = "input"; 1445 io_names[j] = "input";
1435 io_names[j + 1] = "output"; 1446 io_names[j + 1] = "output";
1436 j += 2; 1447 j += 2;
@@ -1444,7 +1455,7 @@ static int init_vqs(struct ports_device *portdev)
1444 for (i = 1; i < nr_ports; i++) { 1455 for (i = 1; i < nr_ports; i++) {
1445 j += 2; 1456 j += 2;
1446 io_callbacks[j] = in_intr; 1457 io_callbacks[j] = in_intr;
1447 io_callbacks[j + 1] = NULL; 1458 io_callbacks[j + 1] = out_intr;
1448 io_names[j] = "input"; 1459 io_names[j] = "input";
1449 io_names[j + 1] = "output"; 1460 io_names[j + 1] = "output";
1450 } 1461 }