From c4206868b288f7c60fe47bcfd4523e1871c8ae62 Mon Sep 17 00:00:00 2001 From: Chase Douglas Date: Tue, 20 Apr 2010 13:44:01 -0400 Subject: [PATCH] Print ALPS packet when not handled --- drivers/input/mouse/alps.c | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index a0671bd..dad578e 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c @@ -23,6 +23,7 @@ #include "alps.h" #undef DEBUG +#define DEBUG #ifdef DEBUG #define dbg(format, arg...) printk(KERN_INFO "alps.c: " format "\n", ## arg) #else @@ -379,6 +380,12 @@ static psmouse_ret_t alps_process_byte(struct psmouse *psmouse) { struct alps_data *priv = psmouse->private; const struct alps_model_info *model = priv->i; + char debugstr[80] = ""; + int i; + + for (i = 0; i < psmouse->pktcnt; i++) { + snprintf(debugstr, 80, "%s %hhx", debugstr, psmouse->packet[i]); + } if ((psmouse->packet[0] & 0xc8) == 0x08) { /* PS/2 packet */ if (psmouse->pktcnt == 3) { @@ -386,6 +393,7 @@ static psmouse_ret_t alps_process_byte(struct psmouse *psmouse) true); return PSMOUSE_FULL_PACKET; } + dbg("returning good data: pktcnt = %hhu, packet:%s\n", psmouse->pktcnt, debugstr); return PSMOUSE_GOOD_DATA; } @@ -415,6 +423,8 @@ static psmouse_ret_t alps_process_byte(struct psmouse *psmouse) return PSMOUSE_FULL_PACKET; } + dbg("returning good data: pktcnt = %hhu, packet:%s\n", psmouse->pktcnt, debugstr); + return PSMOUSE_GOOD_DATA; } -- 1.7.0