From bbf504c37ddced9957fa65aac9a213f322871b07 Mon Sep 17 00:00:00 2001 From: Steven Toth <stoth@kernellabs.com> Date: Sat, 8 Aug 2009 10:22:02 -0300 Subject: 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> --- drivers/media/video/saa7164/saa7164-cmd.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'drivers/media/video/saa7164/saa7164-cmd.c') 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) -- cgit v1.2.3