Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 199722
b: refs/heads/master
c: 0047634
h: refs/heads/master
v: v3
  • Loading branch information
Amit Shah authored and Rusty Russell committed Jun 3, 2010
1 parent 866e01d commit b92b8f9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 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: a5b365a652206ca300256974ed9301a7d241a6ed
refs/heads/master: 0047634d3daebca9e99a22eb89167bf77f35cdfa
10 changes: 7 additions & 3 deletions trunk/drivers/char/virtio_console.c
Original file line number Diff line number Diff line change
Expand Up @@ -1099,6 +1099,13 @@ static int remove_port(struct port *port)
{
struct port_buffer *buf;

if (port->guest_connected) {
port->guest_connected = false;
port->host_connected = false;
wake_up_interruptible(&port->waitqueue);
send_control_msg(port, VIRTIO_CONSOLE_PORT_OPEN, 0);
}

spin_lock_irq(&port->portdev->ports_lock);
list_del(&port->list);
spin_unlock_irq(&port->portdev->ports_lock);
Expand All @@ -1120,9 +1127,6 @@ static int remove_port(struct port *port)
hvc_remove(port->cons.hvc);
#endif
}
if (port->guest_connected)
send_control_msg(port, VIRTIO_CONSOLE_PORT_OPEN, 0);

sysfs_remove_group(&port->dev->kobj, &port_attribute_group);
device_destroy(pdrvdata.class, port->dev->devt);
cdev_del(&port->cdev);
Expand Down

0 comments on commit b92b8f9

Please sign in to comment.