Skip to content

Commit

Permalink
[media] em28xx: clear USB halt/stall condition in em28xx_init_usb_xfe…
Browse files Browse the repository at this point in the history
…r 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>
  • Loading branch information
Frank Schaefer authored and Mauro Carvalho Chehab committed Dec 22, 2012
1 parent 057ca0d commit 337fe8d
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions drivers/media/usb/em28xx/em28xx-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit 337fe8d

Please sign in to comment.