linux/drivers/media/usb
Frank Schaefer 627530c32a [media] em28xx-v4l: give back all active video buffers to the vb2 core properly on streaming stop
When a new video frame is started, the driver takes the next video buffer from
the list of active buffers and moves it to dev->usb_ctl.vid_buf / dev->usb_ctl.vbi_buf
for further processing.

On streaming stop we currently only give back the pending buffers from the list
but not the ones which are currently processed.

This causes the following warning from the vb2 core since kernel 3.15:

...
 ------------[ cut here ]------------
 WARNING: CPU: 1 PID: 2284 at drivers/media/v4l2-core/videobuf2-core.c:2115 __vb2_queue_cancel+0xed/0x150 [videobuf2_core]()
 [...]
 Call Trace:
  [<c0769c46>] dump_stack+0x48/0x69
  [<c0245b69>] warn_slowpath_common+0x79/0x90
  [<f925e4ad>] ? __vb2_queue_cancel+0xed/0x150 [videobuf2_core]
  [<f925e4ad>] ? __vb2_queue_cancel+0xed/0x150 [videobuf2_core]
  [<c0245bfd>] warn_slowpath_null+0x1d/0x20
  [<f925e4ad>] __vb2_queue_cancel+0xed/0x150 [videobuf2_core]
  [<f925fa35>] vb2_internal_streamoff+0x35/0x90 [videobuf2_core]
  [<f925fac5>] vb2_streamoff+0x35/0x60 [videobuf2_core]
  [<f925fb27>] vb2_ioctl_streamoff+0x37/0x40 [videobuf2_core]
  [<f8e45895>] v4l_streamoff+0x15/0x20 [videodev]
  [<f8e4925d>] __video_do_ioctl+0x23d/0x2d0 [videodev]
  [<f8e49020>] ? video_ioctl2+0x20/0x20 [videodev]
  [<f8e48c63>] video_usercopy+0x203/0x5a0 [videodev]
  [<f8e49020>] ? video_ioctl2+0x20/0x20 [videodev]
  [<c039d0e7>] ? fsnotify+0x1e7/0x2b0
  [<f8e49012>] video_ioctl2+0x12/0x20 [videodev]
  [<f8e49020>] ? video_ioctl2+0x20/0x20 [videodev]
  [<f8e4461e>] v4l2_ioctl+0xee/0x130 [videodev]
  [<f8e44530>] ? v4l2_open+0xf0/0xf0 [videodev]
  [<c0378de2>] do_vfs_ioctl+0x2e2/0x4d0
  [<c0368eec>] ? vfs_write+0x13c/0x1c0
  [<c0369a8f>] ? vfs_writev+0x2f/0x50
  [<c0379028>] SyS_ioctl+0x58/0x80
  [<c076fff3>] sysenter_do_call+0x12/0x12
 ---[ end trace 5545f934409f13f4 ]---
...

Many thanks to Hans Verkuil, whose recently added check in the vb2 core unveiled
this long standing issue and who has investigated it further.

Cc: <stable@vger.kernel.org>
Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-08-21 15:25:37 -05:00
..
airspy [media] airspy: fill FMT buffer size 2014-07-21 21:41:48 -03:00
as102 [media] as102-fe: make it an independent driver 2014-08-21 15:25:30 -05:00
au0828 [media] au0828: Fix DVB resume when streaming 2014-08-21 15:25:10 -05:00
b2c2 [media] drivers: media: usb: b2c2: use usb_*_coherent() instead of pci_*_consistent() in flexcop-usb.c 2013-10-17 11:26:41 -03:00
cpia2 [media] media: remove the setting of the flag V4L2_FL_USE_FH_PRIO 2014-07-04 16:14:59 -03:00
cx231xx [media] cx231xx: handle errors at read_eeprom() 2014-07-27 17:03:51 -03:00
dvb-usb [media] Fix typo in comments 2014-07-26 15:09:47 -03:00
dvb-usb-v2 Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2014-08-05 16:36:30 -07:00
em28xx [media] em28xx-v4l: give back all active video buffers to the vb2 core properly on streaming stop 2014-08-21 15:25:37 -05:00
go7007 [media] go7007: move out of staging into drivers/media/usb. 2014-07-22 12:53:33 -03:00
gspca Merge commit '67dd8f35c2d8ed80f26c9654b474cffc11c6674d' into patchwork 2014-07-22 02:03:59 -03:00
hdpvr Merge commit '67dd8f35c2d8ed80f26c9654b474cffc11c6674d' into patchwork 2014-07-22 02:03:59 -03:00
msi2500 [media] msi2500: rename namespace msi3101 => msi2500 2014-07-22 11:35:39 -03:00
pvrusb2 [media] media: pvrusb2: make logging code sane 2014-07-17 20:05:38 -03:00
pwc [media] media: remove the setting of the flag V4L2_FL_USE_FH_PRIO 2014-07-04 16:14:59 -03:00
s2255 [media] media: remove the setting of the flag V4L2_FL_USE_FH_PRIO 2014-07-04 16:14:59 -03:00
siano [media] siano: add support for PCTV 77e 2014-08-21 15:25:27 -05:00
stk1160 [media] media: remove the setting of the flag V4L2_FL_USE_FH_PRIO 2014-07-04 16:14:59 -03:00
stkwebcam [media] v4l: Support extending the v4l2_pix_format structure 2014-07-17 12:44:47 -03:00
tlg2300 [media] v4l: Support extending the v4l2_pix_format structure 2014-07-17 12:44:47 -03:00
tm6000 [media] rc-core: rename dev->scanmask to dev->scancode_mask 2014-07-25 19:10:43 -03:00
ttusb-budget media: use pci_zalloc_consistent 2014-08-08 15:57:28 -07:00
ttusb-dec media: use pci_zalloc_consistent 2014-08-08 15:57:28 -07:00
usbtv [media] usbtv: add audio support 2014-08-21 15:25:34 -05:00
usbvision [media] drivers/media/usb/usbvision/usbvision-core.c: Remove useless return variables 2014-07-04 15:35:02 -03:00
uvc [media] media: remove the setting of the flag V4L2_FL_USE_FH_PRIO 2014-07-04 16:14:59 -03:00
zr364xx [media] v4l: Support extending the v4l2_pix_format structure 2014-07-17 12:44:47 -03:00
Kconfig [media] as102: promote it out of staging 2014-08-21 15:25:28 -05:00
Makefile [media] as102: promote it out of staging 2014-08-21 15:25:28 -05:00