]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
usb: gadget: uvc: Only halt video streaming endpoint in bulk mode
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Fri, 10 Aug 2018 12:44:57 +0000 (15:44 +0300)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 26 Nov 2019 12:16:49 +0000 (13:16 +0100)
commit4efe6fb70f3e06c43b685885be9ec92ece2cc46b
treeb31a661c6590f71d136c506ab889e00b2ad35395
parentcfe971ccd3349e9e00d043da879c2cbee38a3118
usb: gadget: uvc: Only halt video streaming endpoint in bulk mode

BugLink: https://bugs.launchpad.net/bugs/1853915
[ Upstream commit 8dbf9c7abefd5c1434a956d5c6b25e11183061a3 ]

When USB requests for video data fail to be submitted, the driver
signals a problem to the host by halting the video streaming endpoint.
This is only valid in bulk mode, as isochronous transfers have no
handshake phase and can't thus report a stall. The usb_ep_set_halt()
call returns an error when using isochronous endpoints, which we happily
ignore, but some UDCs complain in the kernel log. Fix this by only
trying to halt the endpoint in bulk mode.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Tested-by: Paul Elder <paul.elder@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/usb/gadget/function/uvc_video.c