[2.3.35] tiny "PS/2 Mouse" patch

Luca Montecchiani (m.luca@teamfab.it)
Thu, 30 Dec 1999 01:56:56 +0100


Hi all,

unlike the 2.2 the new 2.3 kernel skip the probe for PS/2 Mouse
if the bios has already detected it, 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.

--- pc_keyb.c.old Thu Dec 30 00:18:24 1999
+++ pc_keyb.c Thu Dec 30 00:47:00 1999
@@ -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);

happy new year,
luca

-- 
------------------------------------------------------------------
E-mail......: Luca Montecchiani <m.luca@iname.com>
W.W.W.......: http://i.am/m.luca - http://luca.myip.org
Speakfreely.: sflwl -hlwl.fourmilab.ch luca@
I.C.Q.......: 17655604
-----------------------=(Linux since 1995)=-----------------------

Non esiste vento favorevole per il marinaio che non sa dove andare Seneca

- 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/