Skip to contentSkip to conversation

2.5.27 Logitech Busmouse new driver FIX

PATCH In review Osamu Tomita 2 participants 2 messages Jul 22, 2002

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 2.5.27 Logitech Busmouse new driver FIX

Hi.
2.5.26-27 Logitech Busmouse driver doesn't work.
This patch fix it.

Signature · 2 lines
Osamu Tomita
E-mail: [email protected]
logibm.c.lkml renamed from logibm.c.AT +7 -6
@@ -125,13 +125,14 @@
 	outb(LOGIBM_READ_Y_HIGH, LOGIBM_CONTROL_PORT);
 	buttons = inb(LOGIBM_DATA_PORT);
 	dy |= (buttons & 0xf) << 4;
-	buttons = ~buttons;
+	buttons = ~buttons >> 5;
 
 	input_report_rel(&logibm_dev, REL_X, dx);
-	input_report_rel(&logibm_dev, REL_Y, 255 - dy);
-	input_report_key(&logibm_dev, BTN_MIDDLE, buttons & 1);
-	input_report_key(&logibm_dev, BTN_LEFT,   buttons & 2);
-	input_report_key(&logibm_dev, BTN_RIGHT,  buttons & 4);
+	input_report_rel(&logibm_dev, REL_Y, dy);
+	input_report_key(&logibm_dev, BTN_RIGHT,  buttons & 1);
+	input_report_key(&logibm_dev, BTN_MIDDLE, buttons & 2);
+	input_report_key(&logibm_dev, BTN_LEFT,   buttons & 4);
+	outb(LOGIBM_ENABLE_IRQ, LOGIBM_CONTROL_PORT);
 }
 
 #ifndef MODULE
@@ -147,7 +148,7 @@
 
 static int __init logibm_init(void)
 {
-	if (request_region(LOGIBM_BASE, LOGIBM_EXTENT, "logibm")) {
+	if (!request_region(LOGIBM_BASE, LOGIBM_EXTENT, "logibm")) {
 		printk(KERN_ERR "logibm.c: Can't allocate ports at %#x\n", LOGIBM_BASE);
 		return -EBUSY;
 	}
#1 lore raw
Quoted 6 lines · Osamu Tomita

Hi.
2.5.26-27 Logitech Busmouse driver doesn't work.
This patch fix it.

Signature · 2 lines
Osamu Tomita
E-mail: [email protected]

Thanks. Patch applied, and you should see it soon in a 2.5 kernel.

Signature · 2 lines
Vojtech Pavlik
SuSE Labs