Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 288904
b: refs/heads/master
c: 0eedab7
h: refs/heads/master
v: v3
  • Loading branch information
Marc Dietrich authored and Greg Kroah-Hartman committed Jan 31, 2012
1 parent e5be02c commit b55fae9
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4b625c3abe91fca5b5a7f05681c10105af957e4f
refs/heads/master: 0eedab704ed93d03b1ac392fd329f7ed20ab2279
18 changes: 13 additions & 5 deletions trunk/drivers/staging/nvec/nvec_ps2.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@
#define STOP_STREAMING {'\x06', '\x04'}
#define SEND_COMMAND {'\x06', '\x01', '\xf4', '\x01'}

#ifdef NVEC_PS2_DEBUG
#define NVEC_PHD(str, buf, len) \
print_hex_dump(KERN_DEBUG, str, DUMP_PREFIX_NONE, \
16, 1, buf, len, false)
#else
#define NVEC_PHD(str, buf, len)
#endif

static const unsigned char MOUSE_RESET[] = {'\x06', '\x01', '\xff', '\x03'};

struct nvec_ps2 {
Expand Down Expand Up @@ -67,18 +75,18 @@ static int nvec_ps2_notifier(struct notifier_block *nb,
case NVEC_PS2_EVT:
for (i = 0; i < msg[1]; i++)
serio_interrupt(ps2_dev.ser_dev, msg[2 + i], 0);
NVEC_PHD("ps/2 mouse event: ", &msg[2], msg[1]);
return NOTIFY_STOP;

case NVEC_PS2:
if (msg[2] == 1)
if (msg[2] == 1) {
for (i = 0; i < (msg[1] - 2); i++)
serio_interrupt(ps2_dev.ser_dev, msg[i + 4], 0);
else if (msg[1] != 2) { /* !ack */
print_hex_dump(KERN_WARNING, "unhandled mouse event: ",
DUMP_PREFIX_NONE, 16, 1,
msg, msg[1] + 2, true);
NVEC_PHD("ps/2 mouse reply: ", &msg[4], msg[1] - 2);
}

else if (msg[1] != 2) /* !ack */
NVEC_PHD("unhandled mouse event: ", msg, msg[1] + 2);
return NOTIFY_STOP;
}

Expand Down

0 comments on commit b55fae9

Please sign in to comment.