Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 197862
b: refs/heads/master
c: 3425e70
h: refs/heads/master
v: v3
  • Loading branch information
Amit Shah authored and Rusty Russell committed May 19, 2010
1 parent b051086 commit bd8da8f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b99fa815d71023b2e330d63cd7f47d6247ffa321
refs/heads/master: 3425e706bf6faa2965c4e99f39085f7367a8f4e2
16 changes: 11 additions & 5 deletions trunk/drivers/char/virtio_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -374,22 +374,22 @@ static bool port_has_data(struct port *port)
return ret;
}

static ssize_t send_control_msg(struct port *port, unsigned int event,
unsigned int value)
static ssize_t __send_control_msg(struct ports_device *portdev, u32 port_id,
unsigned int event, unsigned int value)
{
struct scatterlist sg[1];
struct virtio_console_control cpkt;
struct virtqueue *vq;
unsigned int len;

if (!use_multiport(port->portdev))
if (!use_multiport(portdev))
return 0;

cpkt.id = port->id;
cpkt.id = port_id;
cpkt.event = event;
cpkt.value = value;

vq = port->portdev->c_ovq;
vq = portdev->c_ovq;

sg_init_one(sg, &cpkt, sizeof(cpkt));
if (virtqueue_add_buf(vq, sg, 1, 0, &cpkt) >= 0) {
Expand All @@ -400,6 +400,12 @@ static ssize_t send_control_msg(struct port *port, unsigned int event,
return 0;
}

static ssize_t send_control_msg(struct port *port, unsigned int event,
unsigned int value)
{
return __send_control_msg(port->portdev, port->id, event, value);
}

static ssize_t send_buf(struct port *port, void *in_buf, size_t in_count)
{
struct scatterlist sg[1];
Expand Down

0 comments on commit bd8da8f

Please sign in to comment.