media: uvcvideo: Handle control pipe protocol STALLs
authorGuennadi Liakhovetski <guennadi.liakhovetski@intel.com>
Tue, 8 May 2018 15:07:44 +0000 (11:07 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Fri, 27 Jul 2018 10:39:57 +0000 (06:39 -0400)
commit8e7a1dbc7b0ae048bf3f4b9707fe1a845e69aab7
tree7b37fafe4ae28b1c2b7f04ecb89454aceb75f2fd
parent222964eaf2472053221341c331eb81e87c8b04f2
media: uvcvideo: Handle control pipe protocol STALLs

When a command ends up in a STALL on the control pipe, use the Request
Error Code control to provide a more precise error information to the
user. For example, if a camera is still busy processing a control,
when the same or an interrelated control set request arrives, the
camera can react with a STALL and then return the "Not ready" status
in response to a UVC_VC_REQUEST_ERROR_CODE_CONTROL command. With this
patch the user would then get an EBUSY error code instead of a
generic EPIPE.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@intel.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/usb/uvc/uvc_video.c