lkml.org 
[lkml]   [1996]   [May]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectBug fix for 2.0...
Date
From

I just found out that the ms bus mouse has to be *recompiled* to
change the IRQ. That's a bug worth fixing for 2.0, IMHO. I just
put together this patch.

Now, despite my rant about people not testing their submissions,
I haven't tested this patch, but that's because I don't have
a bus mouse to test it with. I would ask that anyone with an
ms bus mouse please test this and get back to me! However, since
the vger lists appear to be down at the moment, I don't know when
that will happen.

Linus, could you please put this into the next kernel? It's based
completely on busmouse.c, so it shouldn't cause any problems at
all.

Thanks!

michaelkjohnson

--- init/main.c.orig Thu May 9 17:40:40 1996
+++ init/main.c Thu May 9 17:42:26 1996
@@ -62,6 +62,7 @@
extern void buff_setup(char *str, int *ints);
extern void panic_setup(char *str, int *ints);
extern void bmouse_setup(char *str, int *ints);
+extern void msmouse_setup(char *str, int *ints);
extern void lp_setup(char *str, int *ints);
extern void eth_setup(char *str, int *ints);
extern void xd_setup(char *str, int *ints);
@@ -273,6 +274,9 @@
#endif
#ifdef CONFIG_BUSMOUSE
{ "bmouse=", bmouse_setup },
+#endif
+#ifdef CONFIG_MS_BUSMOUSE
+ { "msmouse=", msmouse_setup },
#endif
#ifdef CONFIG_SCSI_SEAGATE
{ "st0x=", st0x_setup },
--- drivers/char/msbusmouse.c.orig Thu May 9 17:37:48 1996
+++ drivers/char/msbusmouse.c Thu May 9 17:42:44 1996
@@ -47,6 +47,13 @@
#include <asm/irq.h>

static struct mouse_status mouse;
+static int mouse_irq = MOUSE_IRQ;
+
+void msmouse_setup(char *str, int *ints)
+{
+ if (ints[0] > 0)
+ mouse_irq=ints[1];
+}

static void ms_mouse_interrupt(int irq, void *dev_id, struct pt_regs * regs)
{
@@ -97,7 +104,7 @@
return;
MS_MSE_INT_OFF();
mouse.ready = 0;
- free_irq(MOUSE_IRQ, NULL);
+ free_irq(mouse_irq, NULL);
MOD_DEC_USE_COUNT;
}

@@ -107,7 +114,7 @@
return -EINVAL;
if (mouse.active++)
return 0;
- if (request_irq(MOUSE_IRQ, ms_mouse_interrupt, 0, "MS Busmouse", NULL)) {
+ if (request_irq(mouse_irq, ms_mouse_interrupt, 0, "MS Busmouse", NULL)) {
mouse.active--;
return -EBUSY;
}


\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.023 / U:3.996 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site