From 4e6871c0e42b93564a150e597b30c4aa557d2ef9 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 27 Apr 2011 17:48:57 -0700 Subject: [PATCH] .38 patches --- queue-2.6.38/series | 1 + ...to-hvc_remove-on-console-port-remove.patch | 49 +++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 queue-2.6.38/virtio-console-enable-call-to-hvc_remove-on-console-port-remove.patch diff --git a/queue-2.6.38/series b/queue-2.6.38/series index df5dc809844..0b2a1610741 100644 --- a/queue-2.6.38/series +++ b/queue-2.6.38/series @@ -36,3 +36,4 @@ acpi-pm-avoid-infinite-recurrence-while-registering-power-resources.patch slub-fix-panic-with-discontigmem.patch set-memory-ranges-in-n_normal_memory-when-onlined.patch flexcop-pci-fix-__xlate_proc_name-warning-for-flexcop-pci.patch +virtio-console-enable-call-to-hvc_remove-on-console-port-remove.patch diff --git a/queue-2.6.38/virtio-console-enable-call-to-hvc_remove-on-console-port-remove.patch b/queue-2.6.38/virtio-console-enable-call-to-hvc_remove-on-console-port-remove.patch new file mode 100644 index 00000000000..c3c63ee77b9 --- /dev/null +++ b/queue-2.6.38/virtio-console-enable-call-to-hvc_remove-on-console-port-remove.patch @@ -0,0 +1,49 @@ +From afa2689e19073cd2e762d0f2c1358fab1ab9f18c Mon Sep 17 00:00:00 2001 +From: Amit Shah +Date: Mon, 14 Mar 2011 17:45:48 +0530 +Subject: virtio: console: Enable call to hvc_remove() on console port remove + +From: Amit Shah + +commit afa2689e19073cd2e762d0f2c1358fab1ab9f18c upstream. + +This call was disabled as hot-unplugging one virtconsole port led to +another virtconsole port freezing. + +Upon testing it again, this now works, so enable it. + +In addition, a bug was found in qemu wherein removing a port of one type +caused the guest output from another port to stop working. I doubt it +was just this bug that caused it (since disabling the hvc_remove() call +did allow other ports to continue working), but since it's all solved +now, we're fine with hot-unplugging of virtconsole ports. + +Signed-off-by: Amit Shah +Signed-off-by: Rusty Russell +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/char/virtio_console.c | 11 ----------- + 1 file changed, 11 deletions(-) + +--- a/drivers/char/virtio_console.c ++++ b/drivers/char/virtio_console.c +@@ -1280,18 +1280,7 @@ static void unplug_port(struct port *por + spin_lock_irq(&pdrvdata_lock); + list_del(&port->cons.list); + spin_unlock_irq(&pdrvdata_lock); +-#if 0 +- /* +- * hvc_remove() not called as removing one hvc port +- * results in other hvc ports getting frozen. +- * +- * Once this is resolved in hvc, this functionality +- * will be enabled. Till that is done, the -EPIPE +- * return from get_chars() above will help +- * hvc_console.c to clean up on ports we remove here. +- */ + hvc_remove(port->cons.hvc); +-#endif + } + + /* Remove unused data this port might have received. */ -- 2.47.3