aboutsummaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorFrank Schaefer2012-11-08 14:11:43 -0300
committerMauro Carvalho Chehab2012-12-22 18:00:30 -0200
commit337fe8dad58692ac468f4139ea19624ce464d953 (patch)
treec5c03e3a6f6902b51d775647224975525549c083 /drivers/media
parent057ca0da067c8c0c734088eba229ab06e21bc88c (diff)
[media] em28xx: clear USB halt/stall condition in em28xx_init_usb_xfer when using bulk transfers
[mchehab@redhat.com: Fix a CodingStyle issue: don't break strings into separate lines] Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/usb/em28xx/em28xx-core.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/media/usb/em28xx/em28xx-core.c b/drivers/media/usb/em28xx/em28xx-core.c
index d8a8e8bbb870..6b3485d2266a 100644
--- a/drivers/media/usb/em28xx/em28xx-core.c
+++ b/drivers/media/usb/em28xx/em28xx-core.c
@@ -1174,6 +1174,16 @@ int em28xx_init_usb_xfer(struct em28xx *dev, enum em28xx_mode mode,
return rc;
}
+ if (xfer_bulk) {
+ rc = usb_clear_halt(dev->udev, usb_bufs->urb[0]->pipe);
+ if (rc < 0) {
+ em28xx_err("failed to clear USB bulk endpoint stall/halt condition (error=%i)\n",
+ rc);
+ em28xx_uninit_usb_xfer(dev, mode);
+ return rc;
+ }
+ }
+
init_waitqueue_head(&dma_q->wq);
init_waitqueue_head(&vbi_dma_q->wq);