Commit bbf504c3 authored by Steven Toth's avatar Steven Toth Committed by Mauro Carvalho Chehab

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: default avatarSteven Toth <stoth@kernellabs.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 2ceae8fd
...@@ -234,6 +234,12 @@ int saa7164_cmd_wait(struct saa7164_dev *dev, u8 seqno) ...@@ -234,6 +234,12 @@ int saa7164_cmd_wait(struct saa7164_dev *dev, u8 seqno)
__func__, seqno, dev->cmds[seqno].signalled); __func__, seqno, dev->cmds[seqno].signalled);
/* Wait for signalled to be flagged or timeout */ /* 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)); wait_event_timeout(*q, dev->cmds[seqno].signalled, (HZ * waitsecs));
r = time_before(jiffies, stamp + (HZ * waitsecs)); r = time_before(jiffies, stamp + (HZ * waitsecs));
if (r) if (r)
......
...@@ -49,7 +49,7 @@ unsigned int debug; ...@@ -49,7 +49,7 @@ unsigned int debug;
module_param(debug, int, 0644); module_param(debug, int, 0644);
MODULE_PARM_DESC(debug, "enable debug messages"); MODULE_PARM_DESC(debug, "enable debug messages");
unsigned int waitsecs = 1; unsigned int waitsecs = 10;
module_param(waitsecs, int, 0644); module_param(waitsecs, int, 0644);
MODULE_PARM_DESC(debug, "timeout on firmware messages"); MODULE_PARM_DESC(debug, "timeout on firmware messages");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment