aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/ivtv/ivtv-driver.c
diff options
context:
space:
mode:
authorIan Armstrong <ian@iarmst.demon.co.uk>2010-06-12 12:33:21 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-08-02 13:47:55 -0400
commit914610e8c508224a6fb9fb501ed4bda25b340ba6 (patch)
tree461d7bf99143ddda1847be4e9095a65268530ec3 /drivers/media/video/ivtv/ivtv-driver.c
parenta5ba334cda924eb0ae4754321ad7fc292c5a5288 (diff)
V4L/DVB: ivtv: Add firmare monitoring and debug mode to ignore firmware problems
>From Ian's e-mail: When a device is opened the firmware state will be checked. If it isn't responding then the open will fail with -EIO. Due to the nature of the hardware, a single failed check will block everything since we don't know exactly what has failed. A side effect of this is the blocking of debug access, so an additional debug level has been created which allows the block to be bypassed. Andy Walls' modifications: I modified Ian's patch to add a separate fw_debug module parameter to change the driver's behavior, as opposed to using the normal debug module parameter. The fw_debug module parameter is only available when CONFIG_VIDEO_ADV_DEBUG is set. I also made some minor whitespace adjustments and changed some warning messages to be a bit more specific. s/happy/glad/g Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk> Signed-off-by: Andy Walls <awalls@md.metrocast.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-driver.c')
-rw-r--r--drivers/media/video/ivtv/ivtv-driver.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/media/video/ivtv/ivtv-driver.c b/drivers/media/video/ivtv/ivtv-driver.c
index 1b79475ca134..3737797f20ea 100644
--- a/drivers/media/video/ivtv/ivtv-driver.c
+++ b/drivers/media/video/ivtv/ivtv-driver.c
@@ -130,6 +130,9 @@ static int ivtv_yuv_threshold = -1;
130static int ivtv_pci_latency = 1; 130static int ivtv_pci_latency = 1;
131 131
132int ivtv_debug; 132int ivtv_debug;
133#ifdef CONFIG_VIDEO_ADV_DEBUG
134int ivtv_fw_debug;
135#endif
133 136
134static int tunertype = -1; 137static int tunertype = -1;
135static int newi2c = -1; 138static int newi2c = -1;
@@ -141,6 +144,9 @@ module_param_string(pal, pal, sizeof(pal), 0644);
141module_param_string(secam, secam, sizeof(secam), 0644); 144module_param_string(secam, secam, sizeof(secam), 0644);
142module_param_string(ntsc, ntsc, sizeof(ntsc), 0644); 145module_param_string(ntsc, ntsc, sizeof(ntsc), 0644);
143module_param_named(debug,ivtv_debug, int, 0644); 146module_param_named(debug,ivtv_debug, int, 0644);
147#ifdef CONFIG_VIDEO_ADV_DEBUG
148module_param_named(fw_debug, ivtv_fw_debug, int, 0644);
149#endif
144module_param(ivtv_pci_latency, int, 0644); 150module_param(ivtv_pci_latency, int, 0644);
145module_param(ivtv_yuv_mode, int, 0644); 151module_param(ivtv_yuv_mode, int, 0644);
146module_param(ivtv_yuv_threshold, int, 0644); 152module_param(ivtv_yuv_threshold, int, 0644);
@@ -217,6 +223,10 @@ MODULE_PARM_DESC(debug,
217 "\t\t\t 256/0x0100: yuv\n" 223 "\t\t\t 256/0x0100: yuv\n"
218 "\t\t\t 512/0x0200: i2c\n" 224 "\t\t\t 512/0x0200: i2c\n"
219 "\t\t\t1024/0x0400: high volume\n"); 225 "\t\t\t1024/0x0400: high volume\n");
226#ifdef CONFIG_VIDEO_ADV_DEBUG
227MODULE_PARM_DESC(fw_debug,
228 "Enable code for debugging firmware problems. Default: 0\n");
229#endif
220MODULE_PARM_DESC(ivtv_pci_latency, 230MODULE_PARM_DESC(ivtv_pci_latency,
221 "Change the PCI latency to 64 if lower: 0 = No, 1 = Yes,\n" 231 "Change the PCI latency to 64 if lower: 0 = No, 1 = Yes,\n"
222 "\t\t\tDefault: Yes"); 232 "\t\t\tDefault: Yes");
@@ -1425,6 +1435,9 @@ EXPORT_SYMBOL(ivtv_vapi);
1425EXPORT_SYMBOL(ivtv_vapi_result); 1435EXPORT_SYMBOL(ivtv_vapi_result);
1426EXPORT_SYMBOL(ivtv_clear_irq_mask); 1436EXPORT_SYMBOL(ivtv_clear_irq_mask);
1427EXPORT_SYMBOL(ivtv_debug); 1437EXPORT_SYMBOL(ivtv_debug);
1438#ifdef CONFIG_VIDEO_ADV_DEBUG
1439EXPORT_SYMBOL(ivtv_fw_debug);
1440#endif
1428EXPORT_SYMBOL(ivtv_reset_ir_gpio); 1441EXPORT_SYMBOL(ivtv_reset_ir_gpio);
1429EXPORT_SYMBOL(ivtv_udma_setup); 1442EXPORT_SYMBOL(ivtv_udma_setup);
1430EXPORT_SYMBOL(ivtv_udma_unmap); 1443EXPORT_SYMBOL(ivtv_udma_unmap);