WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] disable bogus touchpad device model, which cause annoyin

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] disable bogus touchpad device model, which cause annoying dmesg on 2.6 kernel
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 21 Oct 2005 18:54:19 +0000
Delivery-date: Fri, 21 Oct 2005 18:52:54 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 27c8bc033f16e46619ca40ff38ebfaca238e5485
# Parent  6450e40ad21a089e51e0d6f0400079ea580f1289
disable bogus touchpad device model, which cause annoying dmesg on 2.6 kernel
Signed-off-by: Edwin Zhai <edwin.zhai@xxxxxxxxx>

diff -r 6450e40ad21a -r 27c8bc033f16 tools/ioemu/hw/pckbd.c
--- a/tools/ioemu/hw/pckbd.c    Thu Oct 20 10:27:51 2005
+++ b/tools/ioemu/hw/pckbd.c    Thu Oct 20 10:52:27 2005
@@ -29,6 +29,9 @@
 /* debug PC keyboard : only mouse */
 //#define DEBUG_MOUSE
 
+/* enable synapatic touchpad device model */
+//#define SYNAPTIC
+
 /*     Keyboard Controller Commands */
 #define KBD_CCMD_READ_MODE     0x20    /* Read mode bits */
 #define KBD_CCMD_WRITE_MODE    0x60    /* Write mode bits */
@@ -117,10 +120,12 @@
     int rptr, wptr, count;
 } KBDQueue;
 
+#ifdef SYNAPTIC
 typedef struct {
     int absolute;
     int high;
 } TouchPad;
+#endif
 
 typedef struct KBDState {
     KBDQueue queue;
@@ -142,7 +147,9 @@
     int mouse_dy;
     int mouse_dz;
     uint8_t mouse_buttons;
+#ifdef SYNAPTIC
     TouchPad touchpad;
+#endif
 } KBDState;
 
 KBDState kbd_state;
@@ -399,6 +406,7 @@
     dx1 = s->mouse_dx;
     dy1 = s->mouse_dy;
     dz1 = s->mouse_dz;
+#ifdef SYNAPTIC
     if (s->touchpad.absolute)
     {
        int dz2, dleftnright, dg, df;
@@ -444,6 +452,7 @@
        kbd_queue(s, dy1 & 0xFF, 1);
        return;
     }
+#endif
     /* XXX: increase range to 8 bits ? */
     if (dx1 > 127)
         dx1 = 127;
@@ -516,9 +525,11 @@
 
 static void kbd_write_mouse(KBDState *s, int val)
 {
+#ifdef SYNAPTIC
 /* variables needed to store synaptics command info */
 static int rr = 0, ss = 0, tt = 0, uu = 0, res_count = 0, last_com = 0;
 int spare;
+#endif
 #ifdef DEBUG_MOUSE
     printf("kbd: write mouse 0x%02x\n", val);
 #endif
@@ -536,7 +547,9 @@
                 return;
             }
         }
+#ifdef SYNAPTIC
        last_com = val;
+#endif
         switch(val) {
         case AUX_SET_SCALE11:
             s->mouse_status &= ~MOUSE_STATUS_SCALE21;
@@ -568,6 +581,7 @@
             kbd_queue(s, AUX_ACK, 1);
             break;
         case AUX_GET_SCALE:
+#ifdef SYNAPTIC
            if (res_count == 4)
            {
                    /* time for the special stuff */
@@ -681,6 +695,7 @@
                    }
            }
            else
+#endif
            {
                    /* not a special command, just do the regular stuff */
             kbd_queue(s, AUX_ACK, 1);
@@ -705,14 +720,18 @@
             s->mouse_sample_rate = 100;
             s->mouse_resolution = 2;
             s->mouse_status = 0;
+#ifdef SYNAPTIC
                    s->touchpad.absolute = 0;
+#endif
             kbd_queue(s, AUX_ACK, 1);
             break;
         case AUX_RESET:
             s->mouse_sample_rate = 100;
             s->mouse_resolution = 2;
             s->mouse_status = 0;
+#ifdef SYNAPTIC
            s->touchpad.absolute = 0;
+#endif
             kbd_queue(s, AUX_ACK, 1);
             kbd_queue(s, 0xaa, 1);
             kbd_queue(s, s->mouse_type, 1);
@@ -722,6 +741,7 @@
         }
         break;
     case AUX_SET_SAMPLE:
+#ifdef SYNAPTIC
        if (res_count == 4 && val == 0x14)
        {
                /* time for the special stuff */
@@ -729,6 +749,7 @@
                val = (rr*64) + (ss*16) + (tt*4) + uu;
                /* TODO: set the mode byte */
        } else
+#endif
         s->mouse_sample_rate = val;
 #if 0
         /* detect IMPS/2 or IMEX */
@@ -762,6 +783,7 @@
         s->mouse_write_cmd = -1;
         break;
     case AUX_SET_RES:
+#ifdef SYNAPTIC
        if (last_com != AUX_SET_RES)
        {
                /* if its not 4 in a row, its not a command */
@@ -790,6 +812,7 @@
                        uu = val;
                        break;
        }
+#endif
         s->mouse_resolution = val;
         kbd_queue(s, AUX_ACK, 1);
         s->mouse_write_cmd = -1;
@@ -871,8 +894,10 @@
     qemu_put_be32s(f, &s->mouse_dy);
     qemu_put_be32s(f, &s->mouse_dz);
     qemu_put_8s(f, &s->mouse_buttons);
+#ifdef SYNAPTIC
     qemu_put_be32s(f, &s->touchpad.absolute);
     qemu_put_be32s(f, &s->touchpad.high);
+#endif
 }
 
 static int kbd_load(QEMUFile* f, void* opaque, int version_id)
@@ -897,8 +922,10 @@
     qemu_get_be32s(f, &s->mouse_dy);
     qemu_get_be32s(f, &s->mouse_dz);
     qemu_get_8s(f, &s->mouse_buttons);
+#ifdef SYNAPTIC
     qemu_get_be32s(f, &s->touchpad.absolute);
     qemu_get_be32s(f, &s->touchpad.high);
+#endif
     return 0;
 }
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] disable bogus touchpad device model, which cause annoying dmesg on 2.6 kernel, Xen patchbot -unstable <=