aboutsummaryrefslogtreecommitdiffstats
diff options
authorGreg Kroah-Hartman <gregkh@suse.de>2010-03-15 17:18:11 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2010-03-15 17:18:11 -0700
commit97ec65a07a3dc0baa6f59cae57f9cee4b45ef1a8 (patch)
treefca41f15e82a19c6255e92c0b83c790f54cb3d94
parent09154d450cedd7f5e5d16dd77d0d776a600c3012 (diff)
downloadpatches-97ec65a07a3dc0baa6f59cae57f9cee4b45ef1a8.tar.gz
revert a tty patch
-rw-r--r--series1
-rw-r--r--tty.current/revert-tty-add-a-new-vt-mode-which-is-like-vt_process-but-doesn-t-require-a-vt_reldisp-ioctl-call.patch120
2 files changed, 121 insertions, 0 deletions
diff --git a/series b/series
index 77a269be366b19..614d7b030653d3 100644
--- a/series
+++ b/series
@@ -21,6 +21,7 @@ driver-core.current/sysdev-the-cpu-probe-release-attributes-should-be-sysdev_cla
#################################
# TTY patches for 2.6.34
#################################
+tty.current/revert-tty-add-a-new-vt-mode-which-is-like-vt_process-but-doesn-t-require-a-vt_reldisp-ioctl-call.patch
tty.current/tty-take-a-256-byte-padding-into-account-when-buffering-below-sub-page-units.patch
tty.current/uartlite-fix-build-on-sparc.patch
tty.current/hvc_console-fix-race-between-hvc_close-and-hvc_remove.patch
diff --git a/tty.current/revert-tty-add-a-new-vt-mode-which-is-like-vt_process-but-doesn-t-require-a-vt_reldisp-ioctl-call.patch b/tty.current/revert-tty-add-a-new-vt-mode-which-is-like-vt_process-but-doesn-t-require-a-vt_reldisp-ioctl-call.patch
new file mode 100644
index 00000000000000..95800ea416ed9c
--- /dev/null
+++ b/tty.current/revert-tty-add-a-new-vt-mode-which-is-like-vt_process-but-doesn-t-require-a-vt_reldisp-ioctl-call.patch
@@ -0,0 +1,120 @@
+From fa9a3750b0a78601c337ec2410d468972a1823a1 Mon Sep 17 00:00:00 2001
+From: Greg Kroah-Hartman <gregkh@suse.de>
+Date: Mon, 15 Mar 2010 17:14:15 -0700
+Subject: [PATCH] Revert "tty: Add a new VT mode which is like VT_PROCESS but doesn't require a VT_RELDISP ioctl call"
+
+This reverts commit eec9fe7d1ab4a0dfac4cb43047a7657fffd0002f.
+
+Ari writes as the reason this should be reverted:
+ The problems with this patch include:
+ 1. There's at least one subtlety I overlooked - switching
+ between X servers (i.e. from one X VT to another) still requires
+ the cooperation of both X servers. I was assuming that KMS
+ eliminated this.
+ 2. It hasn't been tested at all (no X server patch exists which
+ uses the new mode).
+
+As he was the original author of the patch, I'll revert it.
+
+Cc: Ari Entlich <atrigent@ccs.neu.edu>
+Cc: Alan Cox <alan@linux.intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/char/vt_ioctl.c | 39 +++++++++++++++++++--------------------
+ include/linux/vt.h | 3 +--
+ 2 files changed, 20 insertions(+), 22 deletions(-)
+
+--- a/drivers/char/vt_ioctl.c
++++ b/drivers/char/vt_ioctl.c
+@@ -888,7 +888,7 @@ int vt_ioctl(struct tty_struct *tty, str
+ ret = -EFAULT;
+ goto out;
+ }
+- if (tmp.mode != VT_AUTO && tmp.mode != VT_PROCESS && tmp.mode != VT_PROCESS_AUTO) {
++ if (tmp.mode != VT_AUTO && tmp.mode != VT_PROCESS) {
+ ret = -EINVAL;
+ goto out;
+ }
+@@ -1622,7 +1622,7 @@ static void complete_change_console(stru
+ * telling it that it has acquired. Also check if it has died and
+ * clean up (similar to logic employed in change_console())
+ */
+- if (vc->vt_mode.mode == VT_PROCESS || vc->vt_mode.mode == VT_PROCESS_AUTO) {
++ if (vc->vt_mode.mode == VT_PROCESS) {
+ /*
+ * Send the signal as privileged - kill_pid() will
+ * tell us if the process has gone or something else
+@@ -1682,7 +1682,7 @@ void change_console(struct vc_data *new_
+ * vt to auto control.
+ */
+ vc = vc_cons[fg_console].d;
+- if (vc->vt_mode.mode == VT_PROCESS || vc->vt_mode.mode == VT_PROCESS_AUTO) {
++ if (vc->vt_mode.mode == VT_PROCESS) {
+ /*
+ * Send the signal as privileged - kill_pid() will
+ * tell us if the process has gone or something else
+@@ -1693,28 +1693,27 @@ void change_console(struct vc_data *new_
+ */
+ vc->vt_newvt = new_vc->vc_num;
+ if (kill_pid(vc->vt_pid, vc->vt_mode.relsig, 1) == 0) {
+- if(vc->vt_mode.mode == VT_PROCESS)
+- /*
+- * It worked. Mark the vt to switch to and
+- * return. The process needs to send us a
+- * VT_RELDISP ioctl to complete the switch.
+- */
+- return;
+- } else {
+ /*
+- * The controlling process has died, so we revert back to
+- * normal operation. In this case, we'll also change back
+- * to KD_TEXT mode. I'm not sure if this is strictly correct
+- * but it saves the agony when the X server dies and the screen
+- * remains blanked due to KD_GRAPHICS! It would be nice to do
+- * this outside of VT_PROCESS but there is no single process
+- * to account for and tracking tty count may be undesirable.
++ * It worked. Mark the vt to switch to and
++ * return. The process needs to send us a
++ * VT_RELDISP ioctl to complete the switch.
+ */
+- reset_vc(vc);
++ return;
+ }
+
+ /*
+- * Fall through to normal (VT_AUTO and VT_PROCESS_AUTO) handling of the switch...
++ * The controlling process has died, so we revert back to
++ * normal operation. In this case, we'll also change back
++ * to KD_TEXT mode. I'm not sure if this is strictly correct
++ * but it saves the agony when the X server dies and the screen
++ * remains blanked due to KD_GRAPHICS! It would be nice to do
++ * this outside of VT_PROCESS but there is no single process
++ * to account for and tracking tty count may be undesirable.
++ */
++ reset_vc(vc);
++
++ /*
++ * Fall through to normal (VT_AUTO) handling of the switch...
+ */
+ }
+
+--- a/include/linux/vt.h
++++ b/include/linux/vt.h
+@@ -27,7 +27,7 @@ struct vt_mode {
+ #define VT_SETMODE 0x5602 /* set mode of active vt */
+ #define VT_AUTO 0x00 /* auto vt switching */
+ #define VT_PROCESS 0x01 /* process controls switching */
+-#define VT_PROCESS_AUTO 0x02 /* process is notified of switching */
++#define VT_ACKACQ 0x02 /* acknowledge switch */
+
+ struct vt_stat {
+ unsigned short v_active; /* active vt */
+@@ -38,7 +38,6 @@ struct vt_stat {
+ #define VT_SENDSIG 0x5604 /* signal to send to bitmask of vts */
+
+ #define VT_RELDISP 0x5605 /* release display */
+-#define VT_ACKACQ 0x02 /* acknowledge switch */
+
+ #define VT_ACTIVATE 0x5606 /* make vt active */
+ #define VT_WAITACTIVE 0x5607 /* wait for vt active */