diff options
author | Steven Toth <stoth@kernellabs.com> | 2009-08-08 09:22:02 -0400 |
---|---|---|
committer | Steven Toth <stoth@kernellabs.com> | 2009-08-08 09:22:02 -0400 |
commit | 91f126526d556b2cc57c002ec784a0f6dfa719ad (patch) | |
tree | a8fa0c0c201db53df13a30050503a7e8525d7e87 /linux/drivers/media/video | |
parent | 146ac189aee63544316936c3b8f40d42f11c6008 (diff) | |
download | mediapointer-dvb-s2-91f126526d556b2cc57c002ec784a0f6dfa719ad.tar.gz mediapointer-dvb-s2-91f126526d556b2cc57c002ec784a0f6dfa719ad.tar.bz2 |
SAA7164: Increase the firmware command timeout to avoid firmware errors.
From: Steven Toth <stoth@kernellabs.com>
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.
Priority: normal
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r-- | linux/drivers/media/video/saa7164/saa7164-cmd.c | 6 | ||||
-rw-r--r-- | linux/drivers/media/video/saa7164/saa7164-core.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/linux/drivers/media/video/saa7164/saa7164-cmd.c b/linux/drivers/media/video/saa7164/saa7164-cmd.c index 171ef116f..cd3af4d43 100644 --- a/linux/drivers/media/video/saa7164/saa7164-cmd.c +++ b/linux/drivers/media/video/saa7164/saa7164-cmd.c @@ -234,6 +234,12 @@ int saa7164_cmd_wait(struct saa7164_dev *dev, u8 seqno) __func__, seqno, dev->cmds[seqno].signalled); /* Wait for signalled to be flagged or timeout */ + /* In a highly stressed system this can easily extend + * into multiple seconds before the deferred worker + * is scheduled, and we're woken up via signal. + * We typically are signalled in < 50ms but it can + * take MUCH longer. + */ wait_event_timeout(*q, dev->cmds[seqno].signalled, (HZ * waitsecs)); r = time_before(jiffies, stamp + (HZ * waitsecs)); if (r) diff --git a/linux/drivers/media/video/saa7164/saa7164-core.c b/linux/drivers/media/video/saa7164/saa7164-core.c index d83dae21b..0c03e420e 100644 --- a/linux/drivers/media/video/saa7164/saa7164-core.c +++ b/linux/drivers/media/video/saa7164/saa7164-core.c @@ -50,7 +50,7 @@ unsigned int debug; module_param(debug, int, 0644); MODULE_PARM_DESC(debug, "enable debug messages"); -unsigned int waitsecs = 1; +unsigned int waitsecs = 10; module_param(waitsecs, int, 0644); MODULE_PARM_DESC(debug, "timeout on firmware messages"); |