[2.3.3x] tiny "PS/2 Mouse" patch

From: Luca Montecchiani (m.luca@teamfab.it)
Date: Sat Jan 08 2000 - 14:57:08 EST


Hi,
 
unlike the 2.2 the new 2.3 kernel skip the probe for PS/2 Mouse
if the bios has already detected it, maybe this is good.

Skipping that function PS/2 Mouse is never showed during kernel
boot process.

I've wrote a simple patch that correct this and also show the
irq where available.

Patch is quite simple and tested only on i386 platform.

ciao,
luca

--- pc_keyb.c.luca Sat Jan 8 18:33:36 2000
+++ pc_keyb.c Sun Jan 2 10:20:57 2000
@@ -746,7 +746,10 @@
        int loops = 10;
        int retval = 0;

- /* Check if the BIOS detected a device on the auxiliary port. */
+ /*
+ * Skip probe if the BIOS has already detected a device on the
+ * auxiliary port or arch != i386
+ */
        if (aux_device_present == 0xaa)
                return 1;

@@ -770,10 +773,8 @@

                if (status & KBD_STAT_OBF) {
                        (void) kbd_read_input();
- if (status & KBD_STAT_MOUSE_OBF) {
- printk(KERN_INFO "Detected PS/2 Mouse Port.\n");
+ if (status & KBD_STAT_MOUSE_OBF)
                                retval = 1;
- }
                        break;
                }
                mdelay(1);
@@ -989,6 +990,12 @@
 {
        if (!detect_auxiliary_port())
                return -EIO;
+
+#ifdef AUX_IRQ
+ printk(KERN_INFO "Detected PS/2 Mouse Port (irq = %d)\n",AUX_IRQ);
+#else
+ printk(KERN_INFO "Detected PS/2 Mouse Port\n");
+#endif

        misc_register(&psaux_mouse);
        queue = (struct aux_queue *) kmalloc(sizeof(*queue), GFP_KERNEL);

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sat Jan 15 2000 - 21:00:12 EST