Skip to content

Commit

Permalink
Merge git://git.kernel.org/pub/scm/linux/kernel/git/rusty/linux-2.6-f…
Browse files Browse the repository at this point in the history
…or-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
  • Loading branch information
Linus Torvalds committed Feb 9, 2011
2 parents aceb91c + 5084f89 commit d3d373e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
18 changes: 15 additions & 3 deletions drivers/tty/hvc/virtio_console.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/*
* Copyright (C) 2006, 2007, 2009 Rusty Russell, IBM Corporation
* Copyright (C) 2009, 2010 Red Hat, Inc.
* Copyright (C) 2009, 2010, 2011 Red Hat, Inc.
* Copyright (C) 2009, 2010, 2011 Amit Shah <amit.shah@redhat.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -1462,6 +1463,17 @@ static void control_work_handler(struct work_struct *work)
spin_unlock(&portdev->cvq_lock);
}

static void out_intr(struct virtqueue *vq)
{
struct port *port;

port = find_port_by_vq(vq->vdev->priv, vq);
if (!port)
return;

wake_up_interruptible(&port->waitqueue);
}

static void in_intr(struct virtqueue *vq)
{
struct port *port;
Expand Down Expand Up @@ -1566,7 +1578,7 @@ static int init_vqs(struct ports_device *portdev)
*/
j = 0;
io_callbacks[j] = in_intr;
io_callbacks[j + 1] = NULL;
io_callbacks[j + 1] = out_intr;
io_names[j] = "input";
io_names[j + 1] = "output";
j += 2;
Expand All @@ -1580,7 +1592,7 @@ static int init_vqs(struct ports_device *portdev)
for (i = 1; i < nr_ports; i++) {
j += 2;
io_callbacks[j] = in_intr;
io_callbacks[j + 1] = NULL;
io_callbacks[j + 1] = out_intr;
io_names[j] = "input";
io_names[j + 1] = "output";
}
Expand Down
3 changes: 2 additions & 1 deletion include/linux/virtio_console.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
* This header, excluding the #ifdef __KERNEL__ part, is BSD licensed so
* anyone can use the definitions to implement compatible drivers/servers.
*
* Copyright (C) Red Hat, Inc., 2009, 2010
* Copyright (C) Red Hat, Inc., 2009, 2010, 2011
* Copyright (C) Amit Shah <amit.shah@redhat.com>, 2009, 2010, 2011
*/

/* Feature bits */
Expand Down

0 comments on commit d3d373e

Please sign in to comment.