aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Toth <stoth@kernellabs.com>2009-08-08 09:22:02 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-09-18 23:15:06 -0400
commitbbf504c37ddced9957fa65aac9a213f322871b07 (patch)
treebf081f9c2d02679fdf5caf30150fc09e1f5c46f7
parent2ceae8fdfa55475ef8d7cb9bcaf3fd242ea1edcc (diff)
V4L/DVB (12938): SAA7164: Increase the firmware command timeout to avoid firmware errors.
The firmware typically responds in < 50ms and, via the interrupts and deferred work queue the caller (blocked in the driver) is signalled very efficiently. In a highly stressed system this can take many multiples of seconds. So, we need a larger maximum timeout for busy systems. Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/video/saa7164/saa7164-cmd.c6
-rw-r--r--drivers/media/video/saa7164/saa7164-core.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/drivers/media/video/saa7164/saa7164-cmd.c b/drivers/media/video/saa7164/saa7164-cmd.c
index 171ef116f078..cd3af4d4364f 100644
--- a/drivers/media/video/saa7164/saa7164-cmd.c
+++ b/drivers/media/video/saa7164/saa7164-cmd.c
@@ -234,6 +234,12 @@ int saa7164_cmd_wait(struct saa7164_dev *dev, u8 seqno)
234 __func__, seqno, dev->cmds[seqno].signalled); 234 __func__, seqno, dev->cmds[seqno].signalled);
235 235
236 /* Wait for signalled to be flagged or timeout */ 236 /* Wait for signalled to be flagged or timeout */
237 /* In a highly stressed system this can easily extend
238 * into multiple seconds before the deferred worker
239 * is scheduled, and we're woken up via signal.
240 * We typically are signalled in < 50ms but it can
241 * take MUCH longer.
242 */
237 wait_event_timeout(*q, dev->cmds[seqno].signalled, (HZ * waitsecs)); 243 wait_event_timeout(*q, dev->cmds[seqno].signalled, (HZ * waitsecs));
238 r = time_before(jiffies, stamp + (HZ * waitsecs)); 244 r = time_before(jiffies, stamp + (HZ * waitsecs));
239 if (r) 245 if (r)
diff --git a/drivers/media/video/saa7164/saa7164-core.c b/drivers/media/video/saa7164/saa7164-core.c
index 06dab7cbcaac..da6dbe579624 100644
--- a/drivers/media/video/saa7164/saa7164-core.c
+++ b/drivers/media/video/saa7164/saa7164-core.c
@@ -49,7 +49,7 @@ unsigned int debug;
49module_param(debug, int, 0644); 49module_param(debug, int, 0644);
50MODULE_PARM_DESC(debug, "enable debug messages"); 50MODULE_PARM_DESC(debug, "enable debug messages");
51 51
52unsigned int waitsecs = 1; 52unsigned int waitsecs = 10;
53module_param(waitsecs, int, 0644); 53module_param(waitsecs, int, 0644);
54MODULE_PARM_DESC(debug, "timeout on firmware messages"); 54MODULE_PARM_DESC(debug, "timeout on firmware messages");
55 55