From: Hans Verkuil <[email protected]>

The timeout is way too small. Especially complicated command like
CX2341X_ENC_STOP_CAPTURE takes much more time than 10 ms. Increase the
timeout to 1 second, just as ivtv does (the cx88-blackbird has the
same IP core for MPEG compression as ivtv).

This solves a nasty issue where STOP_CAPTURE would timeout and the
mailbox is left in a busy state, making it impossible to start streaming
a second time without reloading the driver first.

Signed-off-by: Hans Verkuil <[email protected]>
---
 drivers/media/pci/cx88/cx88-blackbird.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/pci/cx88/cx88-blackbird.c 
b/drivers/media/pci/cx88/cx88-blackbird.c
index f27a3f1..32fb935 100644
--- a/drivers/media/pci/cx88/cx88-blackbird.c
+++ b/drivers/media/pci/cx88/cx88-blackbird.c
@@ -348,7 +348,7 @@ static int blackbird_mbox_func(void *priv, u32 command, int 
in, int out, u32 dat
        memory_write(dev->core, dev->mailbox, flag);
 
        /* wait for firmware to handle the API command */
-       timeout = jiffies + msecs_to_jiffies(10);
+       timeout = jiffies + msecs_to_jiffies(1000);
        for (;;) {
                memory_read(dev->core, dev->mailbox, &flag);
                if (0 != (flag & 4))
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to