1
linux/drivers/media/video/gspca
Hans Verkuil 254902b01d [media] gspca: Fix locking issues related to suspend/resume
There are two bugs here: first the calls to stop0 (in gspca_suspend) and
gspca_init_transfer (in gspca_resume) need to be called with the usb_lock held.
That's true for the other places they are called and it is what subdrivers
expect. Quite a few will unlock the usb_lock in stop0 while waiting for a
worker thread to finish, and if usb_lock isn't held then that can cause a
kernel oops.

The other problem is that a worker thread needs to detect that it has to
halt due to a suspend. Otherwise it will just go on looping. So add tests
against gspca_dev->frozen in the worker threads that need it.

Hdg, 2 minor changes:
1) The finepix device is ok with stopping reading a frame halfway through,
   so add frozen checks in all places where we also check if we're still
   streaming
2) Use gspca_dev->dev instead of gspca_dev->present to check for disconnect
   in all touched drivers. I plan to do this everywhere in the future, and
   most relevant lines in the touched drivers are already modified by this
   patch.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-05-14 09:28:39 -03:00
..
gl860 [media] media: gspca: append $(srctree) to -I parameters 2012-03-08 10:42:08 -03:00
m5602 [media] media: gspca: append $(srctree) to -I parameters 2012-03-08 10:42:08 -03:00
stv06xx [media] media: gspca: append $(srctree) to -I parameters 2012-03-08 10:42:08 -03:00
autogain_functions.h [media] gspca/autogain_functions.h: Allow users to declare what they want 2012-05-07 16:11:48 -03:00
benq.c Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2012-01-15 12:49:56 -08:00
conex.c USB: convert drivers/media/* to use module_usb_driver() 2011-11-18 09:46:12 -08:00
cpia1.c USB: convert drivers/media/* to use module_usb_driver() 2011-11-18 09:46:12 -08:00
etoms.c USB: convert drivers/media/* to use module_usb_driver() 2011-11-18 09:46:12 -08:00
finepix.c [media] gspca: Fix locking issues related to suspend/resume 2012-05-14 09:28:39 -03:00
gspca.c [media] gspca: Fix locking issues related to suspend/resume 2012-05-14 09:28:39 -03:00
gspca.h [media] gscpa: Use v4l2_fh and add G/S_PRIORITY support 2012-05-14 09:26:57 -03:00
jeilinj.c USB: convert drivers/media/* to use module_usb_driver() 2011-11-18 09:46:12 -08:00
jl2005bcd.c [media] gspca: Fix locking issues related to suspend/resume 2012-05-14 09:28:39 -03:00
jpeg.h
Kconfig [media] gspca: Add jl2005bcd sub driver 2012-01-06 10:39:45 -02:00
kinect.c USB: convert drivers/media/* to use module_usb_driver() 2011-11-18 09:46:12 -08:00
konica.c Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2012-01-15 12:49:56 -08:00
Makefile [media] gspca: Add jl2005bcd sub driver 2012-01-06 10:39:45 -02:00
mars.c Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2012-01-15 12:49:56 -08:00
mr97310a.c USB: convert drivers/media/* to use module_usb_driver() 2011-11-18 09:46:12 -08:00
nw80x.c [media] gspca/autogain_functions.h: Allow users to declare what they want 2012-05-07 16:11:48 -03:00
ov519.c [media] gspca - ov519: Add more information about probe problems 2012-05-03 15:29:52 -03:00
ov534_9.c [media] gspca - ov534_9: Add brightness to OmniVision 5621 sensor 2012-03-19 22:27:01 -03:00
ov534.c USB: convert drivers/media/* to use module_usb_driver() 2011-11-18 09:46:12 -08:00
pac207.c Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2012-01-15 12:49:56 -08:00
pac7302.c [media] gspca_pac7302: Improve the gain control 2012-05-07 16:15:48 -03:00
pac7311.c [media] gspca_pac7311: Properly set the compression balance 2012-05-07 16:15:21 -03:00
pac_common.h
se401.c Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2012-01-15 12:49:56 -08:00
se401.h [media] gspca: Add new se401 camera driver 2011-07-27 17:53:41 -03:00
sn9c20x.c [media] gspca - sn9c20x: Change the exposure setting of Omnivision sensors 2012-05-03 15:29:56 -03:00
sn9c2028.c USB: convert drivers/media/* to use module_usb_driver() 2011-11-18 09:46:12 -08:00
sn9c2028.h
sonixb.c [media] gspca/autogain_functions.h: Allow users to declare what they want 2012-05-07 16:11:48 -03:00
sonixj.c [media] gspca/autogain_functions.h: Allow users to declare what they want 2012-05-07 16:11:48 -03:00
spca500.c USB: convert drivers/media/* to use module_usb_driver() 2011-11-18 09:46:12 -08:00
spca501.c USB: convert drivers/media/* to use module_usb_driver() 2011-11-18 09:46:12 -08:00
spca505.c USB: convert drivers/media/* to use module_usb_driver() 2011-11-18 09:46:12 -08:00
spca506.c USB: convert drivers/media/* to use module_usb_driver() 2011-11-18 09:46:12 -08:00
spca508.c USB: convert drivers/media/* to use module_usb_driver() 2011-11-18 09:46:12 -08:00
spca561.c Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2012-01-15 12:49:56 -08:00
spca1528.c USB: convert drivers/media/* to use module_usb_driver() 2011-11-18 09:46:12 -08:00
sq905.c [media] gspca: Fix locking issues related to suspend/resume 2012-05-14 09:28:39 -03:00
sq905c.c [media] gspca: Fix locking issues related to suspend/resume 2012-05-14 09:28:39 -03:00
sq930x.c USB: convert drivers/media/* to use module_usb_driver() 2011-11-18 09:46:12 -08:00
stk014.c USB: convert drivers/media/* to use module_usb_driver() 2011-11-18 09:46:12 -08:00
stv0680.c USB: convert drivers/media/* to use module_usb_driver() 2011-11-18 09:46:12 -08:00
sunplus.c USB: convert drivers/media/* to use module_usb_driver() 2011-11-18 09:46:12 -08:00
t613.c Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2012-01-15 12:49:56 -08:00
topro.c [media] gspca/autogain_functions.h: Allow users to declare what they want 2012-05-07 16:11:48 -03:00
tv8532.c USB: convert drivers/media/* to use module_usb_driver() 2011-11-18 09:46:12 -08:00
vc032x.c USB: convert drivers/media/* to use module_usb_driver() 2011-11-18 09:46:12 -08:00
vicam.c [media] gspca: Fix locking issues related to suspend/resume 2012-05-14 09:28:39 -03:00
w996Xcf.c [media] gspca: Use current logging styles 2011-09-04 11:06:05 -03:00
xirlink_cit.c Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media 2012-01-15 12:49:56 -08:00
zc3xx-reg.h [media] gspca - zc3xx: Remove double definition 2011-03-22 04:54:40 -03:00
zc3xx.c [media] gspca: Fix locking issues related to suspend/resume 2012-05-14 09:28:39 -03:00