diff options
author | Ian Armstrong <ian@iarmst.demon.co.uk> | 2010-06-12 12:33:21 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-08-02 13:47:55 -0400 |
commit | 914610e8c508224a6fb9fb501ed4bda25b340ba6 (patch) | |
tree | 461d7bf99143ddda1847be4e9095a65268530ec3 /drivers/media/video/ivtv/ivtv-driver.c | |
parent | a5ba334cda924eb0ae4754321ad7fc292c5a5288 (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.c | 13 |
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; | |||
130 | static int ivtv_pci_latency = 1; | 130 | static int ivtv_pci_latency = 1; |
131 | 131 | ||
132 | int ivtv_debug; | 132 | int ivtv_debug; |
133 | #ifdef CONFIG_VIDEO_ADV_DEBUG | ||
134 | int ivtv_fw_debug; | ||
135 | #endif | ||
133 | 136 | ||
134 | static int tunertype = -1; | 137 | static int tunertype = -1; |
135 | static int newi2c = -1; | 138 | static int newi2c = -1; |
@@ -141,6 +144,9 @@ module_param_string(pal, pal, sizeof(pal), 0644); | |||
141 | module_param_string(secam, secam, sizeof(secam), 0644); | 144 | module_param_string(secam, secam, sizeof(secam), 0644); |
142 | module_param_string(ntsc, ntsc, sizeof(ntsc), 0644); | 145 | module_param_string(ntsc, ntsc, sizeof(ntsc), 0644); |
143 | module_param_named(debug,ivtv_debug, int, 0644); | 146 | module_param_named(debug,ivtv_debug, int, 0644); |
147 | #ifdef CONFIG_VIDEO_ADV_DEBUG | ||
148 | module_param_named(fw_debug, ivtv_fw_debug, int, 0644); | ||
149 | #endif | ||
144 | module_param(ivtv_pci_latency, int, 0644); | 150 | module_param(ivtv_pci_latency, int, 0644); |
145 | module_param(ivtv_yuv_mode, int, 0644); | 151 | module_param(ivtv_yuv_mode, int, 0644); |
146 | module_param(ivtv_yuv_threshold, int, 0644); | 152 | module_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 | ||
227 | MODULE_PARM_DESC(fw_debug, | ||
228 | "Enable code for debugging firmware problems. Default: 0\n"); | ||
229 | #endif | ||
220 | MODULE_PARM_DESC(ivtv_pci_latency, | 230 | MODULE_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); | |||
1425 | EXPORT_SYMBOL(ivtv_vapi_result); | 1435 | EXPORT_SYMBOL(ivtv_vapi_result); |
1426 | EXPORT_SYMBOL(ivtv_clear_irq_mask); | 1436 | EXPORT_SYMBOL(ivtv_clear_irq_mask); |
1427 | EXPORT_SYMBOL(ivtv_debug); | 1437 | EXPORT_SYMBOL(ivtv_debug); |
1438 | #ifdef CONFIG_VIDEO_ADV_DEBUG | ||
1439 | EXPORT_SYMBOL(ivtv_fw_debug); | ||
1440 | #endif | ||
1428 | EXPORT_SYMBOL(ivtv_reset_ir_gpio); | 1441 | EXPORT_SYMBOL(ivtv_reset_ir_gpio); |
1429 | EXPORT_SYMBOL(ivtv_udma_setup); | 1442 | EXPORT_SYMBOL(ivtv_udma_setup); |
1430 | EXPORT_SYMBOL(ivtv_udma_unmap); | 1443 | EXPORT_SYMBOL(ivtv_udma_unmap); |