summaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorAntti Palosaari <crope@iki.fi>2013-07-11 17:19:32 +0200
committerMauro Carvalho Chehab <m.chehab@samsung.com>2013-08-20 20:59:18 +0200
commitd0fadf40338fc551f4bbb82fc4c223d2a8de2c1d (patch)
treee5bb1902f9a8e5c924228d6ea014994c7bbb8893 /drivers/staging
parent[media] msi3101: enhance sampling results (diff)
downloadlinux-d0fadf40338fc551f4bbb82fc4c223d2a8de2c1d.tar.xz
linux-d0fadf40338fc551f4bbb82fc4c223d2a8de2c1d.zip
[media] msi3101: fix stream re-start halt
Restarting stream fails quite often. Small delay is between urb killing and stream stop command - likely to give harware some time to process killed urbs. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/media/msi3101/sdr-msi3101.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/staging/media/msi3101/sdr-msi3101.c b/drivers/staging/media/msi3101/sdr-msi3101.c
index c73f1d9979a9..2180bf88842f 100644
--- a/drivers/staging/media/msi3101/sdr-msi3101.c
+++ b/drivers/staging/media/msi3101/sdr-msi3101.c
@@ -959,7 +959,7 @@ static int msi3101_ctrl_msg(struct msi3101_state *s, u8 cmd, u32 data)
msi3101_dbg_usb_control_msg(s->udev,
request, requesttype, value, index, NULL, 0);
- ret = usb_control_msg(s->udev, usb_rcvctrlpipe(s->udev, 0),
+ ret = usb_control_msg(s->udev, usb_sndctrlpipe(s->udev, 0),
request, requesttype, value, index, NULL, 0, 2000);
if (ret)
@@ -1300,12 +1300,15 @@ static int msi3101_stop_streaming(struct vb2_queue *vq)
if (mutex_lock_interruptible(&s->v4l2_lock))
return -ERESTARTSYS;
- msi3101_ctrl_msg(s, CMD_STOP_STREAMING, 0);
-
if (s->udev)
msi3101_isoc_cleanup(s);
msi3101_cleanup_queued_bufs(s);
+
+ /* according to tests, at least 700us delay is required */
+ msleep(20);
+ msi3101_ctrl_msg(s, CMD_STOP_STREAMING, 0);
+
mutex_unlock(&s->v4l2_lock);
return 0;