ref: 2c5b8d0b9a37377925e75c1f7030c61e1f1d039f
parent: 7aa5cb087d4a720e5f8da5334236ea4b8a61119b
parent: 022f45c9c5efeed133c1d486a878f3923a730399
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun Sep 28 14:29:41 EDT 2014
merge
--- a/sys/src/9/pc/devkbd.c
+++ b/sys/src/9/pc/devkbd.c
@@ -187,7 +187,7 @@
iunlock(&i8042lock);
if(c != 0xFA){- print("i8042: %2.2ux returned to the %2.2ux command\n", c, cmd);+ print("i8042: %2.2ux returned to the %2.2ux command (pc=%#p)\n", c, cmd, getcallerpc(&cmd));return -1;
}
return 0;
@@ -303,6 +303,7 @@
print(err);
outb(Cmd, 0xA8); /* auxiliary device enable */
if(outready() < 0){+ print(err);
iunlock(&i8042lock);
return;
}
--- a/sys/src/9/pc/mouse.c
+++ b/sys/src/9/pc/mouse.c
@@ -113,7 +113,7 @@
}
msg[nb] = c;
- if(++nb == packetsize){+ if(++nb >= packetsize){nb = 0;
if(msg[0] & 0x10)
msg[1] |= 0xFF00;
@@ -152,7 +152,6 @@
dy = -msg[2];
mousetrack(dx, dy, buttons, TK2MS(MACHP(0)->ticks));
}
- return;
}
/*
@@ -164,12 +163,12 @@
if(mousetype == MousePS2)
return;
- i8042auxenable(ps2mouseputc);
- i8042auxcmd(0xEA); /* set stream mode */
-
mousetype = MousePS2;
packetsize = 3;
mousehwaccel = 0;
+
+ i8042auxenable(ps2mouseputc);
+ i8042auxcmd(0xEA); /* set stream mode */
}
/*
--
⑨