summaryrefslogtreecommitdiff
path: root/sys/src
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@felloff.net>2014-09-28 18:29:41 +0200
committercinap_lenrek <cinap_lenrek@felloff.net>2014-09-28 18:29:41 +0200
commitdbb0f46e583d54bdd63ace2d1a8e74e8a8b89a84 (patch)
tree5b6356348421ecc9b426aeb0b7281cc2d2c3df2c /sys/src
parentd2716316476c54c16a45705207db7c2c50a9a8c5 (diff)
parent36db1295be07b790f381e0157df7731767a25dc0 (diff)
merge
Diffstat (limited to 'sys/src')
-rw-r--r--sys/src/9/pc/devkbd.c3
-rw-r--r--sys/src/9/pc/mouse.c9
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/src/9/pc/devkbd.c b/sys/src/9/pc/devkbd.c
index db8e477e4..f951f8b52 100644
--- a/sys/src/9/pc/devkbd.c
+++ b/sys/src/9/pc/devkbd.c
@@ -187,7 +187,7 @@ i8042auxcmd(int cmd)
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 @@ i8042auxenable(void (*putc)(int, int))
print(err);
outb(Cmd, 0xA8); /* auxiliary device enable */
if(outready() < 0){
+ print(err);
iunlock(&i8042lock);
return;
}
diff --git a/sys/src/9/pc/mouse.c b/sys/src/9/pc/mouse.c
index 0519e5e76..9d69095f9 100644
--- a/sys/src/9/pc/mouse.c
+++ b/sys/src/9/pc/mouse.c
@@ -113,7 +113,7 @@ ps2mouseputc(int c, int shift)
}
msg[nb] = c;
- if(++nb == packetsize){
+ if(++nb >= packetsize){
nb = 0;
if(msg[0] & 0x10)
msg[1] |= 0xFF00;
@@ -152,7 +152,6 @@ ps2mouseputc(int c, int shift)
dy = -msg[2];
mousetrack(dx, dy, buttons, TK2MS(MACHP(0)->ticks));
}
- return;
}
/*
@@ -164,12 +163,12 @@ ps2mouse(void)
if(mousetype == MousePS2)
return;
- i8042auxenable(ps2mouseputc);
- i8042auxcmd(0xEA); /* set stream mode */
-
mousetype = MousePS2;
packetsize = 3;
mousehwaccel = 0;
+
+ i8042auxenable(ps2mouseputc);
+ i8042auxcmd(0xEA); /* set stream mode */
}
/*