From b8f884164bdfbcecf61e891b52d8a03fec9ed461 Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Fri, 29 Aug 2014 05:45:59 -0300 Subject: [PATCH] [media] cx88: increase API command timeout 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 Signed-off-by: Mauro Carvalho Chehab --- 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 f27a3f134025..32fb9355c9f6 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.34.1