summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAmit Shah <amit.shah@redhat.com>2010-05-06 02:05:07 +0530
committerRusty Russell <rusty@rustcorp.com.au>2010-05-19 22:15:50 +0930
commit4038f5b767a610c5a5d92d7047755c663ead1568 (patch)
tree6ddc8d34e69dd311305d66ebaba9a2dde5d64364 /drivers
parentcdfadfc1adb87fc7e8a631b1f299715feacbde90 (diff)
downloadlinux-4038f5b767a610c5a5d92d7047755c663ead1568.tar.gz
linux-4038f5b767a610c5a5d92d7047755c663ead1568.tar.bz2
linux-4038f5b767a610c5a5d92d7047755c663ead1568.zip
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: Amit 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: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/char/virtio_console.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c
index 4175a2ae972f..1e3f4674da4a 100644
--- a/drivers/char/virtio_console.c
+++ b/drivers/char/virtio_console.c
@@ -1319,13 +1319,16 @@ static void config_intr(struct virtio_device *vdev)
portdev = vdev->priv;
- /*
- * We'll use this way of resizing only for legacy support.
- * For newer userspace (VIRTIO_CONSOLE_F_MULTPORT+), use
- * control messages to indicate console size changes so that
- * it can be done per-port
- */
- resize_console(find_port_by_id(portdev, 0));
+ if (!use_multiport(portdev)) {
+ /*
+ * We'll use this way of resizing only for legacy
+ * support. For newer userspace
+ * (VIRTIO_CONSOLE_F_MULTPORT+), use control messages
+ * to indicate console size changes so that it can be
+ * done per-port.
+ */
+ resize_console(find_port_by_id(portdev, 0));
+ }
}
static int init_vqs(struct ports_device *portdev)