linux/drivers/usb/gadget/function
Xu Yang b52a07e07d usb: gadget: uvc: queue pump work in uvcg_video_enable()
Since commit "6acba0345b68 usb:gadget:uvc Do not use worker thread to pump
isoc usb requests", pump work could only be queued in uvc_video_complete()
and uvc_v4l2_qbuf(). If VIDIOC_QBUF is executed before VIDIOC_STREAMON,
we can only depend on uvc_video_complete() to queue pump work. However,
this requires some free requests in req_ready list. If req_ready list is
empty all the time, pump work will never be queued and video datas will
never be pumped to usb controller. Actually, this situation could happen
when run uvc-gadget with static image:

$ ./uvc-gadget -i 1080p.jpg uvc.0

When capture image from this device, the user app will always block there.

The issue is uvc driver has queued video buffer before streamon, but the
req_ready list is empty all the time after streamon. This will queue pump
work in uvcg_video_enable() to fill some request to req_ready list so the
uvc device could work properly.

Fixes: 6acba0345b ("usb:gadget:uvc Do not use worker thread to pump isoc usb requests")
Cc: stable@vger.kernel.org
Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
Link: https://lore.kernel.org/r/20240814112537.2608949-1-xu.yang_2@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-08-22 17:28:39 +08:00
..
f_acm.c usb: gadget: add missing MODULE_DESCRIPTION() macros 2024-06-20 19:18:19 +02:00
f_ecm.c usb: gadget: add missing MODULE_DESCRIPTION() macros 2024-06-20 19:18:19 +02:00
f_eem.c usb: gadget: add missing MODULE_DESCRIPTION() macros 2024-06-20 19:18:19 +02:00
f_fs.c usb: gadget: f_fs: pull out f->disable() from ffs_func_set_alt() 2024-08-07 12:40:59 +02:00
f_hid.c usb: gadget: add missing MODULE_DESCRIPTION() macros 2024-06-20 19:18:19 +02:00
f_loopback.c usb: gadget: add missing MODULE_DESCRIPTION() macros 2024-06-20 19:18:19 +02:00
f_mass_storage.c usb: gadget: add missing MODULE_DESCRIPTION() macros 2024-06-20 19:18:19 +02:00
f_mass_storage.h
f_midi2.c usb: gadget: midi2: Fix the response for FB info with block 0xff 2024-07-31 10:38:53 +02:00
f_midi.c usb: gadget: add missing MODULE_DESCRIPTION() macros 2024-06-20 19:18:19 +02:00
f_ncm.c usb: gadget: add missing MODULE_DESCRIPTION() macros 2024-06-20 19:18:19 +02:00
f_obex.c usb: gadget: add missing MODULE_DESCRIPTION() macros 2024-06-20 19:18:19 +02:00
f_phonet.c usb: gadget: add missing MODULE_DESCRIPTION() macros 2024-06-20 19:18:19 +02:00
f_printer.c Merge 6.10-rc6 into usb-next 2024-07-01 13:59:29 +02:00
f_rndis.c usb: gadget: add missing MODULE_DESCRIPTION() macros 2024-06-20 19:18:19 +02:00
f_serial.c usb: gadget: add missing MODULE_DESCRIPTION() macros 2024-06-20 19:18:19 +02:00
f_sourcesink.c usb: gadget: add missing MODULE_DESCRIPTION() macros 2024-06-20 19:18:19 +02:00
f_subset.c usb: gadget: add missing MODULE_DESCRIPTION() macros 2024-06-20 19:18:19 +02:00
f_tcm.c usb: gadget: add missing MODULE_DESCRIPTION() macros 2024-06-20 19:18:19 +02:00
f_uac1_legacy.c usb: gadget: add missing MODULE_DESCRIPTION() macros 2024-06-20 19:18:19 +02:00
f_uac1.c usb: gadget: add missing MODULE_DESCRIPTION() macros 2024-06-20 19:18:19 +02:00
f_uac2.c usb: gadget: f_uac2: fix non-newline-terminated function name 2024-07-10 15:40:26 +02:00
f_uvc.c usb: gadget: add missing MODULE_DESCRIPTION() macros 2024-06-20 19:18:19 +02:00
f_uvc.h usb: gadget: uvc: prevent use of disabled endpoint 2023-11-23 12:32:44 +00:00
g_zero.h
Makefile usb: gadget: Add support for USB MIDI 2.0 function driver 2023-07-26 06:38:14 +02:00
ndis.h
rndis.c usb: gadget: function: Remove usage of the deprecated ida_simple_xx() API 2024-04-18 16:46:56 +02:00
rndis.h
storage_common.c usb: gadget: add missing MODULE_DESCRIPTION() macros 2024-06-20 19:18:19 +02:00
storage_common.h
tcm.h
u_audio.c usb: gadget: u_audio: Check return codes from usb_ep_enable and config_ep_by_speed. 2024-07-31 10:38:57 +02:00
u_audio.h
u_ecm.h
u_eem.h
u_ether_configfs.h
u_ether.c Merge 6.10-rc6 into usb-next 2024-07-01 13:59:29 +02:00
u_ether.h usb: gadget: add a inline function gether_bitrate() 2023-08-22 14:48:33 +02:00
u_fs.h usb: gadget: ffs: remove ENTER() macro 2023-03-29 08:55:58 +02:00
u_gether.h
u_hid.h
u_midi2.h usb: gadget: midi2: More flexible MIDI 1.0 configuration 2023-07-26 06:38:14 +02:00
u_midi.h
u_ncm.h usb: gadget: ncm: Add support to update wMaxSegmentSize via configfs 2024-01-04 16:01:14 +01:00
u_phonet.h usb: gadget: function: Remove unused declarations 2023-08-22 14:45:29 +02:00
u_printer.h
u_rndis.h
u_serial.c usb: gadget: u_serial: Set start_delayed during suspend 2024-07-31 10:39:54 +02:00
u_serial.h usb: gadget: function: Remove unused declarations 2023-08-22 14:45:29 +02:00
u_tcm.h
u_uac1_legacy.c
u_uac1_legacy.h
u_uac1.h
u_uac2.h usb: gadget: f_uac2: allow changing terminal types through configfs 2023-10-05 09:35:43 +02:00
u_uvc.h usb: gadget: webcam: Make g_webcam loadable again 2023-12-15 18:27:38 +01:00
uac_common.h
uvc_configfs.c Linux 6.9-rc7 2024-05-10 09:38:01 +01:00
uvc_configfs.h usb: gadget: uvc: Allow linking XUs to string descriptors 2023-02-07 08:46:37 +01:00
uvc_queue.c
uvc_queue.h
uvc_v4l2.c usb: gadget: uvc: fix try format returns on uncompressed formats 2024-03-26 10:42:03 +01:00
uvc_v4l2.h
uvc_video.c usb: gadget: uvc: queue pump work in uvcg_video_enable() 2024-08-22 17:28:39 +08:00
uvc_video.h usb: gadget: uvc: move video disable logic to its own function 2023-11-23 12:32:44 +00:00
uvc.h usb:gadget:uvc Do not use worker thread to pump isoc usb requests 2023-11-23 12:32:44 +00:00