diff options
author | Andy Walls <awalls@radix.net> | 2008-09-28 20:46:02 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-12 07:37:14 -0400 |
commit | d267d85101c509020a12686b96cbd179deaf4ecd (patch) | |
tree | 1a016966d11efb400ca310cd5726478053cd00a0 /drivers/media/video/cx18/cx18-driver.c | |
parent | 7f9876785276ac7f8606f8bf53a3dae4c10b8adb (diff) |
V4L/DVB (9110): cx18: Add default behavior of checking and retrying PCI MMIO accesses
cx18: Add default behavior of checking and retrying PCI MMIO accesses.
The concept of checking and retrying PCI MMIO accesses for better reliability
in older motherboards was suggested by Steve Toth <stoth@linuxtv.org>. This
change implements MMIO retries and the retry_mmio module parameter that is
enabled by default. Limited experiments have shown this is more reliable than
the mmio_ndelay parameter. mmio_ndelay has insignificant effect with retries
enabled.
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx18/cx18-driver.c')
-rw-r--r-- | drivers/media/video/cx18/cx18-driver.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/media/video/cx18/cx18-driver.c b/drivers/media/video/cx18/cx18-driver.c index 4de7b501f207..df5531709ae5 100644 --- a/drivers/media/video/cx18/cx18-driver.c +++ b/drivers/media/video/cx18/cx18-driver.c | |||
@@ -96,6 +96,7 @@ static int enc_pcm_buffers = CX18_DEFAULT_ENC_PCM_BUFFERS; | |||
96 | 96 | ||
97 | static int cx18_pci_latency = 1; | 97 | static int cx18_pci_latency = 1; |
98 | 98 | ||
99 | int cx18_retry_mmio = 1; | ||
99 | int cx18_debug; | 100 | int cx18_debug; |
100 | 101 | ||
101 | module_param_array(tuner, int, &tuner_c, 0644); | 102 | module_param_array(tuner, int, &tuner_c, 0644); |
@@ -106,6 +107,7 @@ module_param_string(pal, pal, sizeof(pal), 0644); | |||
106 | module_param_string(secam, secam, sizeof(secam), 0644); | 107 | module_param_string(secam, secam, sizeof(secam), 0644); |
107 | module_param_string(ntsc, ntsc, sizeof(ntsc), 0644); | 108 | module_param_string(ntsc, ntsc, sizeof(ntsc), 0644); |
108 | module_param_named(debug, cx18_debug, int, 0644); | 109 | module_param_named(debug, cx18_debug, int, 0644); |
110 | module_param_named(retry_mmio, cx18_retry_mmio, int, 0644); | ||
109 | module_param(cx18_pci_latency, int, 0644); | 111 | module_param(cx18_pci_latency, int, 0644); |
110 | module_param(cx18_first_minor, int, 0644); | 112 | module_param(cx18_first_minor, int, 0644); |
111 | 113 | ||
@@ -147,6 +149,9 @@ MODULE_PARM_DESC(debug, | |||
147 | MODULE_PARM_DESC(cx18_pci_latency, | 149 | MODULE_PARM_DESC(cx18_pci_latency, |
148 | "Change the PCI latency to 64 if lower: 0 = No, 1 = Yes,\n" | 150 | "Change the PCI latency to 64 if lower: 0 = No, 1 = Yes,\n" |
149 | "\t\t\tDefault: Yes"); | 151 | "\t\t\tDefault: Yes"); |
152 | MODULE_PARM_DESC(retry_mmio, | ||
153 | "Check and retry memory mapped IO accesses\n" | ||
154 | "\t\t\tDefault: 1 [Yes]"); | ||
150 | MODULE_PARM_DESC(mmio_ndelay, | 155 | MODULE_PARM_DESC(mmio_ndelay, |
151 | "Delay (ns) for each CX23418 memory mapped IO access.\n" | 156 | "Delay (ns) for each CX23418 memory mapped IO access.\n" |
152 | "\t\t\tTry larger values that are close to a multiple of the\n" | 157 | "\t\t\tTry larger values that are close to a multiple of the\n" |
@@ -827,6 +832,7 @@ err: | |||
827 | if (retval == 0) | 832 | if (retval == 0) |
828 | retval = -ENODEV; | 833 | retval = -ENODEV; |
829 | CX18_ERR("Error %d on initialization\n", retval); | 834 | CX18_ERR("Error %d on initialization\n", retval); |
835 | cx18_log_statistics(cx); | ||
830 | 836 | ||
831 | kfree(cx18_cards[cx18_cards_active]); | 837 | kfree(cx18_cards[cx18_cards_active]); |
832 | cx18_cards[cx18_cards_active] = NULL; | 838 | cx18_cards[cx18_cards_active] = NULL; |
@@ -931,6 +937,7 @@ static void cx18_remove(struct pci_dev *pci_dev) | |||
931 | 937 | ||
932 | pci_disable_device(cx->dev); | 938 | pci_disable_device(cx->dev); |
933 | 939 | ||
940 | cx18_log_statistics(cx); | ||
934 | CX18_INFO("Removed %s, card #%d\n", cx->card_name, cx->num); | 941 | CX18_INFO("Removed %s, card #%d\n", cx->card_name, cx->num); |
935 | } | 942 | } |
936 | 943 | ||