<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">
From: Jan-Benedict Glaw &lt;jbglaw@lug-owl.de&gt;

It corrects the the wrong use of "DB9" to the correct name, "DE9".  Also,
some comments/debugging output is fixed up.

Signed-Off-By: Jan-Benedict Glaw &lt;jbglaw@lug-owl.de&gt;
Signed-off-by: Andrew Morton &lt;akpm@osdl.org&gt;
---

 25-akpm/drivers/input/mouse/vsxxxaa.c |   53 ++++++++++++++++++----------------
 1 files changed, 29 insertions(+), 24 deletions(-)

diff -puN drivers/input/mouse/vsxxxaa.c~vsxxxaac-fixups drivers/input/mouse/vsxxxaa.c
--- 25/drivers/input/mouse/vsxxxaa.c~vsxxxaac-fixups	Thu Aug 26 16:08:40 2004
+++ 25-akpm/drivers/input/mouse/vsxxxaa.c	Thu Aug 26 16:09:14 2004
@@ -1,11 +1,14 @@
 /*
- * DEC VSXXX-AA and VSXXX-GA mouse driver.
+ * Driver for	DEC VSXXX-AA mouse (hockey-puck mouse, ball or two rollers)
+ * 		DEC VSXXX-GA mouse (rectangular mouse, with ball)
+ * 		DEC VSXXX-AB tablet (digitizer with hair cross or stylus)
  *
  * Copyright (C) 2003-2004 by Jan-Benedict Glaw &lt;jbglaw@lug-owl.de&gt;
  *
- * The packet format was taken from a patch to GPM which is (C) 2001
+ * The packet format was initially taken from a patch to GPM which is (C) 2001
  * by	Karsten Merker &lt;merker@linuxtag.org&gt;
  * and	Maciej W. Rozycki &lt;macro@ds2.pg.gda.pl&gt;
+ * Later on, I had access to the device's documentation (referenced below).
  */
 
 /*
@@ -25,7 +28,7 @@
  */
 
 /*
- * Building an adaptor to DB9 / DB25 RS232
+ * Building an adaptor to DE9 / DB25 RS232
  * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  *
  * DISCLAIMER: Use this description AT YOUR OWN RISK! I'll not pay for
@@ -43,7 +46,7 @@
  *   \  2 1  /
  *    -------
  * 
- *	DEC socket	DB9	DB25	Note
+ *	DEC socket	DE9	DB25	Note
  *	1 (GND)		5	7	-
  *	2 (RxD)		2	3	-
  *	3 (TxD)		3	2	-
@@ -82,7 +85,7 @@
 #include &lt;linux/serio.h&gt;
 #include &lt;linux/init.h&gt;
 
-#define DRIVER_DESC	"Serial DEC VSXXX-AA/GA mouse / DEC tablet driver"
+#define DRIVER_DESC "Driver for DEC VSXXX-AA and -GA mice and VSXXX-AB tablet"
 
 MODULE_AUTHOR ("Jan-Benedict Glaw &lt;jbglaw@lug-owl.de&gt;");
 MODULE_DESCRIPTION (DRIVER_DESC);
@@ -104,7 +107,7 @@ MODULE_LICENSE ("GPL");
 #define VSXXXAA_PACKET_REL	0x80
 #define VSXXXAA_PACKET_ABS	0xc0
 #define VSXXXAA_PACKET_POR	0xa0
-#define MATCH_PACKET_TYPE(data, type)	(((data) &amp; VSXXXAA_PACKET_MASK) == type)
+#define MATCH_PACKET_TYPE(data, type)	(((data) &amp; VSXXXAA_PACKET_MASK) == (type))
 
 
 
@@ -150,7 +153,7 @@ vsxxxaa_detection_done (struct vsxxxaa *
 {
 	switch (mouse-&gt;type) {
 		case 0x02:
-			sprintf (mouse-&gt;name, "DEC VSXXX-AA/GA mouse");
+			sprintf (mouse-&gt;name, "DEC VSXXX-AA/-GA mouse");
 			break;
 
 		case 0x04:
@@ -158,7 +161,8 @@ vsxxxaa_detection_done (struct vsxxxaa *
 			break;
 
 		default:
-			sprintf (mouse-&gt;name, "unknown DEC pointer device");
+			sprintf (mouse-&gt;name, "unknown DEC pointer device "
+					"(type = 0x%02x)", mouse-&gt;type);
 			break;
 	}
 
@@ -336,13 +340,10 @@ vsxxxaa_handle_POR_packet (struct vsxxxa
 	 *
 	 * M: manufacturer location code
 	 * R: revision code
-	 * E: Error code. I'm not sure about these, but gpm's sources,
-	 *    which support this mouse, too, tell about them:
-	 *	E = [0x00 .. 0x1f]: no error, byte #3 is button state
-	 *	E = 0x3d: button error, byte #3 tells which one.
-	 *	E = &lt;else&gt;: other error
+	 * E: Error code. If it's in the range of 0x00..0x1f, only some
+	 *    minor problem occured. Errors &gt;= 0x20 are considered bad
+	 *    and the device may not work properly...
 	 * D: &lt;0010&gt; == mouse, &lt;0100&gt; == tablet
-	 *
 	 */
 
 	mouse-&gt;version = buf[0] &amp; 0x0f;
@@ -363,28 +364,32 @@ vsxxxaa_handle_POR_packet (struct vsxxxa
 	vsxxxaa_detection_done (mouse);
 
 	if (error &lt;= 0x1f) {
-		/* No error. Report buttons */
+		/* No (serious) error. Report buttons */
 		input_regs (dev, regs);
 		input_report_key (dev, BTN_LEFT, left);
 		input_report_key (dev, BTN_MIDDLE, middle);
 		input_report_key (dev, BTN_RIGHT, right);
 		input_report_key (dev, BTN_TOUCH, 0);
 		input_sync (dev);
-	} else {
-		printk (KERN_ERR "Your %s on %s reports an undefined error, "
-				"please check it...\n", mouse-&gt;name,
-				mouse-&gt;phys);
+
+		if (error != 0)
+			printk (KERN_INFO "Your %s on %s reports error=0x%02x\n",
+					mouse-&gt;name, mouse-&gt;phys, error);
+
 	}
 
 	/*
 	 * If the mouse was hot-plugged, we need to force differential mode
 	 * now... However, give it a second to recover from it's reset.
 	 */
-	printk (KERN_NOTICE "%s on %s: Forceing standard packet format and "
-			"streaming mode\n", mouse-&gt;name, mouse-&gt;phys);
-	mouse-&gt;serio-&gt;write (mouse-&gt;serio, 'S');
+	printk (KERN_NOTICE "%s on %s: Forceing standard packet format, "
+			"incremental streaming mode and 72 samples/sec\n",
+			mouse-&gt;name, mouse-&gt;phys);
+	mouse-&gt;serio-&gt;write (mouse-&gt;serio, 'S');	/* Standard format */
+	mdelay (50);
+	mouse-&gt;serio-&gt;write (mouse-&gt;serio, 'R');	/* Incremental */
 	mdelay (50);
-	mouse-&gt;serio-&gt;write (mouse-&gt;serio, 'R');
+	mouse-&gt;serio-&gt;write (mouse-&gt;serio, 'L');	/* 72 samples/sec */
 }
 
 static void
@@ -519,7 +524,7 @@ vsxxxaa_connect (struct serio *serio, st
 	mouse-&gt;dev.private = mouse;
 	serio-&gt;private = mouse;
 
-	sprintf (mouse-&gt;name, "DEC VSXXX-AA/GA mouse or VSXXX-AB digitizer");
+	sprintf (mouse-&gt;name, "DEC VSXXX-AA/-GA mouse or VSXXX-AB digitizer");
 	sprintf (mouse-&gt;phys, "%s/input0", serio-&gt;phys);
 	mouse-&gt;dev.name = mouse-&gt;name;
 	mouse-&gt;dev.phys = mouse-&gt;phys;
_
</pre></body></html>