summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2006-03-25 16:41:46 -0600
committerMike Isely <isely@pobox.com>2006-03-25 16:41:46 -0600
commit6aa6af1e4b4ce66a75dc8b20b4bd6670c4ecd0cf (patch)
tree5683899bce21912749091741f404524adb4611dd
parent22184ee779d37f2c64b08ea427d939f0e2d58b37 (diff)
downloadmediapointer-dvb-s2-6aa6af1e4b4ce66a75dc8b20b4bd6670c4ecd0cf.tar.gz
mediapointer-dvb-s2-6aa6af1e4b4ce66a75dc8b20b4bd6670c4ecd0cf.tar.bz2
New debug code in pvrusb2 for tracking requests
From: Mike Isely <isely@pobox.com> Implement pvrusb2 code normally compiled-out which can print useful information about commands issued to the hardware. Signed-off-by: Mike Isely <isely@pobox.com>
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c42
1 files changed, 42 insertions, 0 deletions
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(" <probe>");
+ }
+ 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);