diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-02-09 14:51:40 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-02-09 14:51:40 -0500 |
commit | d3d373e0e3f51f335d8c722dd1340ab812fdf94b (patch) | |
tree | 766175dfbbd5688f77e69fe43c835865fd864d2d | |
parent | aceb91cd351bc3a19a783c901fe8a8070d5f6fa9 (diff) | |
parent | 5084f89303c0a138f66bf74662753f46878989bb (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus
* git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-for-linus:
virtio: console: Update Copyright
virtio: console: Wake up outvq on host notifications
-rw-r--r-- | drivers/tty/hvc/virtio_console.c | 18 | ||||
-rw-r--r-- | include/linux/virtio_console.h | 3 |
2 files changed, 17 insertions, 4 deletions
diff --git a/drivers/tty/hvc/virtio_console.c b/drivers/tty/hvc/virtio_console.c index 896a2ced1d27..239d86f9d560 100644 --- a/drivers/tty/hvc/virtio_console.c +++ b/drivers/tty/hvc/virtio_console.c | |||
@@ -1,6 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2006, 2007, 2009 Rusty Russell, IBM Corporation | 2 | * Copyright (C) 2006, 2007, 2009 Rusty Russell, IBM Corporation |
3 | * Copyright (C) 2009, 2010 Red Hat, Inc. | 3 | * Copyright (C) 2009, 2010, 2011 Red Hat, Inc. |
4 | * Copyright (C) 2009, 2010, 2011 Amit Shah <amit.shah@redhat.com> | ||
4 | * | 5 | * |
5 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
6 | * it under the terms of the GNU General Public License as published by | 7 | * it under the terms of the GNU General Public License as published by |
@@ -1462,6 +1463,17 @@ static void control_work_handler(struct work_struct *work) | |||
1462 | spin_unlock(&portdev->cvq_lock); | 1463 | spin_unlock(&portdev->cvq_lock); |
1463 | } | 1464 | } |
1464 | 1465 | ||
1466 | static void out_intr(struct virtqueue *vq) | ||
1467 | { | ||
1468 | struct port *port; | ||
1469 | |||
1470 | port = find_port_by_vq(vq->vdev->priv, vq); | ||
1471 | if (!port) | ||
1472 | return; | ||
1473 | |||
1474 | wake_up_interruptible(&port->waitqueue); | ||
1475 | } | ||
1476 | |||
1465 | static void in_intr(struct virtqueue *vq) | 1477 | static void in_intr(struct virtqueue *vq) |
1466 | { | 1478 | { |
1467 | struct port *port; | 1479 | struct port *port; |
@@ -1566,7 +1578,7 @@ static int init_vqs(struct ports_device *portdev) | |||
1566 | */ | 1578 | */ |
1567 | j = 0; | 1579 | j = 0; |
1568 | io_callbacks[j] = in_intr; | 1580 | io_callbacks[j] = in_intr; |
1569 | io_callbacks[j + 1] = NULL; | 1581 | io_callbacks[j + 1] = out_intr; |
1570 | io_names[j] = "input"; | 1582 | io_names[j] = "input"; |
1571 | io_names[j + 1] = "output"; | 1583 | io_names[j + 1] = "output"; |
1572 | j += 2; | 1584 | j += 2; |
@@ -1580,7 +1592,7 @@ static int init_vqs(struct ports_device *portdev) | |||
1580 | for (i = 1; i < nr_ports; i++) { | 1592 | for (i = 1; i < nr_ports; i++) { |
1581 | j += 2; | 1593 | j += 2; |
1582 | io_callbacks[j] = in_intr; | 1594 | io_callbacks[j] = in_intr; |
1583 | io_callbacks[j + 1] = NULL; | 1595 | io_callbacks[j + 1] = out_intr; |
1584 | io_names[j] = "input"; | 1596 | io_names[j] = "input"; |
1585 | io_names[j + 1] = "output"; | 1597 | io_names[j + 1] = "output"; |
1586 | } | 1598 | } |
diff --git a/include/linux/virtio_console.h b/include/linux/virtio_console.h index a85064db8f94..e4d333543a33 100644 --- a/include/linux/virtio_console.h +++ b/include/linux/virtio_console.h | |||
@@ -7,7 +7,8 @@ | |||
7 | * This header, excluding the #ifdef __KERNEL__ part, is BSD licensed so | 7 | * This header, excluding the #ifdef __KERNEL__ part, is BSD licensed so |
8 | * anyone can use the definitions to implement compatible drivers/servers. | 8 | * anyone can use the definitions to implement compatible drivers/servers. |
9 | * | 9 | * |
10 | * Copyright (C) Red Hat, Inc., 2009, 2010 | 10 | * Copyright (C) Red Hat, Inc., 2009, 2010, 2011 |
11 | * Copyright (C) Amit Shah <amit.shah@redhat.com>, 2009, 2010, 2011 | ||
11 | */ | 12 | */ |
12 | 13 | ||
13 | /* Feature bits */ | 14 | /* Feature bits */ |