From 6aa6af1e4b4ce66a75dc8b20b4bd6670c4ecd0cf Mon Sep 17 00:00:00 2001 From: Mike Isely Date: Sat, 25 Mar 2006 16:41:46 -0600 Subject: New debug code in pvrusb2 for tracking requests From: Mike Isely Implement pvrusb2 code normally compiled-out which can print useful information about commands issued to the hardware. Signed-off-by: Mike Isely --- linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c | 42 +++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c index 16757a8fb..ed5e81224 100644 --- a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c +++ b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c @@ -2064,6 +2064,28 @@ int pvr2_send_request_ex(struct pvr2_hdw *hdw, return -EINVAL; } +#if 0 + printk(KERN_INFO "pvrusb2: REQUEST BEGIN writeCnt=%u readCnt=%u", + write_len,read_len); + if (probe_fl) { + printk(" "); + } + for (idx = 0; idx < write_len; idx++) { + if (idx > 5) { + printk(" ..."); + break; + } + if (idx) { + printk(" "); + } else { + printk(" ["); + } + printk("%02x",((unsigned char *)write_data)[idx]); + } + if (write_len) printk("]"); + printk("\n"); +#endif + hdw->cmd_debug_state = 1; if (write_len) { hdw->cmd_debug_code = ((unsigned char *)write_data)[0]; @@ -2233,6 +2255,26 @@ int pvr2_send_request_ex(struct pvr2_hdw *hdw, } done: +#if 0 + printk(KERN_INFO "pvrusb2: REQUEST END status=%d",status); + if (status >= 0) { + for (idx = 0; idx < read_len; idx++) { + if (idx > 5) { + printk(" ..."); + break; + } + if (idx) { + printk(" "); + } else { + printk(" ["); + } + printk("%02x",((unsigned char *)read_data)[idx]); + } + if (read_len) printk("]"); + } + printk("\n"); +#endif + hdw->cmd_debug_state = 0; if ((status < 0) && (!probe_fl)) { pvr2_hdw_render_useless_unlocked(hdw); -- cgit v1.2.3