xserver-kdrive: remove a blocking read in the keyboard driver resume path
authorPhilipp Zabel <philipp.zabel@gmail.com>
Sat, 2 Feb 2008 23:15:29 +0000 (23:15 +0000)
committerPhilipp Zabel <philipp.zabel@gmail.com>
Sat, 2 Feb 2008 23:15:29 +0000 (23:15 +0000)
packages/xorg-xserver/xserver-kdrive-1.4/keyboard-resume-workaround.patch [new file with mode: 0644]
packages/xorg-xserver/xserver-kdrive_1.4.bb

diff --git a/packages/xorg-xserver/xserver-kdrive-1.4/keyboard-resume-workaround.patch b/packages/xorg-xserver/xserver-kdrive-1.4/keyboard-resume-workaround.patch
new file mode 100644 (file)
index 0000000..ced1904
--- /dev/null
@@ -0,0 +1,18 @@
+Index: xorg-server-1.4/hw/kdrive/linux/keyboard.c
+===================================================================
+--- xorg-server-1.4.orig/hw/kdrive/linux/keyboard.c    2007-09-29 18:31:15.000000000 +0200
++++ xorg-server-1.4/hw/kdrive/linux/keyboard.c 2007-09-29 18:33:02.000000000 +0200
+@@ -743,11 +743,8 @@
+     cfsetispeed(&nTty, 9600);
+     cfsetospeed(&nTty, 9600);
+     tcsetattr(fd, TCSANOW, &nTty);
+-    /*
+-     * Flush any pending keystrokes
+-     */
+-    while ((n = read (fd, buf, sizeof (buf))) > 0)
+-      ;
++    n = fcntl(fd, F_GETFL);
++    fprintf(stderr, "LinuxConsoleFd status flags: %x (O_NONBLOCK = %x)\n", n, O_NONBLOCK);
+     KdRegisterFd (fd, LinuxKeyboardRead, ki);
+     return Success;
+ }
index f4d5be3..c870901 100644 (file)
@@ -3,7 +3,7 @@ require xserver-kdrive-common.inc
 DEPENDS += "hal libxkbfile libxcalibrate pixman"
 
 PE = "1"
-PR = "r2"
+PR = "r3"
 
 SRC_URI = "${XORG_MIRROR}/individual/xserver/xorg-server-${PV}.tar.bz2 \
        ${KDRIVE_COMMON_PATCHES} \
@@ -20,6 +20,7 @@ SRC_URI = "${XORG_MIRROR}/individual/xserver/xorg-server-${PV}.tar.bz2 \
        file://xcalibrate-new-input-world-order.patch;patch=1 \
        file://tslib-default-device.patch;patch=1 \
        file://fbdev-evdev.patch;patch=1 \
+       file://keyboard-resume-workaround.patch;patch=1 \
        file://xorg-avr32-support.diff;patch=1 \
         "