Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37845846
en ru br
Репозитории ALT
4.0: 7.3.0-alt1
3.0: 6.8.2-alt18
+updates:6.8.2-alt24
www.altlinux.org/Changes

Группа :: Система/X11
Пакет: xorg-x11

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: XFree86-4.2.0-ps2-hplso.diff
Скачать


This fix by Paul Anderson and Pontus Lidman.
Fixes server hang on systems with no PS/2 controller.
--- xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_io.c       2001/08/06 20:51:11   3.20
+++ xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_io.c       2001/09/25 08:04:26
@@ -34,6 +34,8 @@
 #include "xf86Priv.h"
 #include "xf86_OSlib.h"
+#define KBC_TIMEOUT 250        /* Timeout in ms for sending to keyboard controller */
+
 void
 xf86SoundKbdBell(int loudness, int pitch, int duration)
 {
@@ -140,6 +142,7 @@
 #endif
 {
   int i;
+  int timeout;
   int         value = 0x7f;    /* Maximum delay with slowest rate */
 #ifdef __sparc__
@@ -193,10 +196,18 @@
       value |= i << 5;
       break;
     }
+
+  timeout = KBC_TIMEOUT;
+  while (((inb(0x64) & 2) == 2) && --timeout)
+       usleep(1000); /* wait */
-  while ((inb(0x64) & 2) == 2); /* wait */
+  if (timeout == 0)
+      return;
+
   outb(0x60, 0xf3);             /* set typematic rate */
-  while ((inb(0x64) & 2) == 2); /* wait */
+  while (((inb(0x64) & 2) == 2) && --timeout)
+       usleep(1000); /* wait */
+
   usleep(10000);
   outb(0x60, value);
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin