summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)
__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/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;
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");