Commit 4038f5b7 authored by Amit Shah's avatar Amit Shah Committed by Rusty Russell

virtio: console: Resize console port 0 on config intr only if multiport is off

When using multiport, we'll use control messages. Ensure we don't
accidentally update port 0 size on config interrupts.
Signed-off-by: default avatarAmit Shah <amit.shah@redhat.com>
CC: Christian Borntraeger <borntraeger@de.ibm.com>
CC: linuxppc-dev@ozlabs.org
CC: Kusanagi Kouichi <slash@ac.auone-net.jp>
Signed-off-by: default avatarRusty Russell <rusty@rustcorp.com.au>
parent cdfadfc1
...@@ -1319,13 +1319,16 @@ static void config_intr(struct virtio_device *vdev) ...@@ -1319,13 +1319,16 @@ static void config_intr(struct virtio_device *vdev)
portdev = vdev->priv; portdev = vdev->priv;
if (!use_multiport(portdev)) {
/* /*
* We'll use this way of resizing only for legacy support. * We'll use this way of resizing only for legacy
* For newer userspace (VIRTIO_CONSOLE_F_MULTPORT+), use * support. For newer userspace
* control messages to indicate console size changes so that * (VIRTIO_CONSOLE_F_MULTPORT+), use control messages
* it can be done per-port * to indicate console size changes so that it can be
* done per-port.
*/ */
resize_console(find_port_by_id(portdev, 0)); resize_console(find_port_by_id(portdev, 0));
}
} }
static int init_vqs(struct ports_device *portdev) static int init_vqs(struct ports_device *portdev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment