It apparently uses a modified version of the Sun mouse protocol.
Attached are the sunmouse driver patch and the gpm patch. The gpm patch
could be worked around trivially by having the kernel driver emulate a
regular Sun mouse, but I'm hoping for some feedback on this from the Sparc
kernel developers instead of just committing to the CVS tree.
In the meantime, enjoy.
-D
*** sunmouse.c.orig Wed Aug 18 00:14:08 1999
--- /usr/src/linux/drivers/sbus/char/sunmouse.c Wed Aug 18 00:14:03 1999
***************
*** 170,180 ****
static int ctr = 0;
if(wait_for_synchron) {
! if((c < 0x80) || (c > 0x87))
mouse_bogon_bytes++;
else {
! ctr = 0;
! wait_for_synchron = 0;
}
} else {
ctr++;
--- 170,185 ----
static int ctr = 0;
if(wait_for_synchron) {
! if ((c & ~0x0f) != 0x80)
mouse_bogon_bytes++;
else {
! if (c & 8) {
! ctr = 2;
! wait_for_synchron = 0;
! } else {
! ctr = 0;
! wait_for_synchron = 0;
! }
}
} else {
ctr++;
***************
*** 184,194 ****
--- 189,201 ----
if(mouse_baud_changing == 1) {
printk(KERN_DEBUG "sunmouse: Successfully adjusted to
%d baud.\n",
mouse_baud);
+ printk("sunmouse: Successfully adjusted to %d
+baud.\n", mouse_baud);
mouse_baud_changing = 0;
}
}
}
if(mouse_bogon_bytes > 12) {
+ printk("too many bogon bytes\n");
sun_mouse_change_baud();
mouse_bogon_bytes = 0;
wait_for_synchron = 1;
***************
*** 220,226 ****
* we are starting at byte zero in the transaction
* protocol.
*/
! if(byte >= 0x80 && byte <= 0x87)
sunmouse.byte = 0;
mvalue = (signed char) byte;
--- 227,233 ----
* we are starting at byte zero in the transaction
* protocol.
*/
! if((byte & ~0x0f) == 0x80)
sunmouse.byte = 0;
mvalue = (signed char) byte;
***************
*** 234,239 ****
--- 241,252 ----
((sunmouse.button_state & 0x2) ? "DOWN" : "UP"),
((sunmouse.button_state & 0x1) ? "DOWN" : "UP"));
#endif
+ /* To deal with the Sparcbook 3 */
+ if (byte & 0x8) {
+ sunmouse.byte+=2;
+ sunmouse.delta_y = 0;
+ sunmouse.delta_x = 0;
+ }
sunmouse.byte++;
return;
case 1:
*** mice.c Fri Feb 19 00:53:42 1999
--- /root/mice.c Wed Aug 18 00:08:38 1999
***************
*** 1199,1205 ****
{0xf8, 0x80, 0x00, 0x00}, 5, 1, 0, 0, R_msc},
{"sun", "'msc' protocol, but only 3 bytes per packet.",
"", M_sun, I_serial, CS8 | CSTOPB | STD_FLG,
! {0xf8, 0x80, 0x00, 0x00}, 3, 1, 0, 0, 0},
{"mm", "MM series. Probably an old protocol...",
"MMSeries", M_mm, I_serial, CS8 | PARENB|PARODD | STD_FLG,
{0xe0, 0x80, 0x80, 0x00}, 3, 1, 0, 0, 0},
--- 1199,1205 ----
{0xf8, 0x80, 0x00, 0x00}, 5, 1, 0, 0, R_msc},
{"sun", "'msc' protocol, but only 3 bytes per packet.",
"", M_sun, I_serial, CS8 | CSTOPB | STD_FLG,
! {0xf0, 0x80, 0x00, 0x00}, 3, 1, 0, 0, 0},
{"mm", "MM series. Probably an old protocol...",
"MMSeries", M_mm, I_serial, CS8 | PARENB|PARODD | STD_FLG,
{0xe0, 0x80, 0x80, 0x00}, 3, 1, 0, 0, 0},