android_kernel_xiaomi_sm8350/drivers/media/dvb
Devin Heitmueller 57594a586f V4L/DVB (11785): dvb_frontend: fix race condition resulting in dropped tuning commands
A race condition was detected in the case that putting the tuner to sleep takes
an unusually long period of time, combined with applications that quickly
close/open the dvb frontend.

The kaffeine channel scanner closes and reopens the dvb frontend between each
tuning attempt.  If it takes an unusually longer period of time to put the
tuner to sleep (for example, the Pinnacle 801e takes 660 ms), the dvb_frontend
thread will still be in a running state (and hence fepriv->thread is still set)
but the fepriv->exit field will still be zero.  As a result, if a
dvb_frontend_start() call arrives while the frontend thread is in the process
of terminating, the call will return 0 without actually starting a new thread.
This results in the tuning request being dropped.

To address this, mark fepriv->exit as soon as we know the thread is going to
be terminated, so that dvb_frontend_start() knows to start a new instance.

Problem encountered with Kaffeine 0.8.7 doing ATSC scanning against the
Pinnacle 801e tuner, in conjunction with new code to power down the xc5000
when not in use.

Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:14:14 -03:00
..
b2c2 V4L/DVB (11964): b2c2: Fix problems with frontend attachment 2009-06-16 19:07:40 -03:00
bt8xx V4L/DVB (11992): Add missing __devexit_p() 2009-06-16 19:07:51 -03:00
dm1105 V4L/DVB (11984): Add support for yet another SDMC DM1105 based DVB-S card. 2009-06-16 19:07:48 -03:00
dvb-core V4L/DVB (11785): dvb_frontend: fix race condition resulting in dropped tuning commands 2009-06-16 19:14:14 -03:00
dvb-usb V4L/DVB (11999): af9015: fix stack corruption bug 2009-06-16 19:07:55 -03:00
firewire V4L/DVB (11739): remove driver_data direct access of struct device 2009-06-16 18:20:58 -03:00
frontends V4L/DVB (12001): lgs8gxx: update signal strength scale 2009-06-16 19:07:56 -03:00
pluto2 dma-mapping: replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32) 2009-04-07 08:31:11 -07:00
siano V4L/DVB (10772): siano: prevent duplicate variable declaration 2009-03-30 12:43:02 -03:00
ttpci V4L/DVB (11763): dvb-ttpci: Some whitespace adjustments 2009-06-16 18:21:02 -03:00
ttusb-budget V4L/DVB (10149): ttusb-budget: make it depend on PCI 2009-01-02 17:12:21 -02:00
ttusb-dec V4L/DVB (10248): v4l-dvb: fix a bunch of compile warnings. 2009-01-29 08:38:04 -02:00
Kconfig firedtv: massive refactoring 2009-02-24 14:51:29 +01:00
Makefile firedtv: rename files, variables, functions from firesat to firedtv 2009-02-24 14:51:29 +01:00