]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
V4L/DVB (9054): implement proper locking in the dvb ca en50221 driver
authorMatthias Dahl <mldvb@mortal-soul.de>
Fri, 26 Sep 2008 09:29:03 +0000 (06:29 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 29 Jan 2009 10:35:37 +0000 (08:35 -0200)
commitd7e43844e40e07cadc48f1733b9738659f83b38c
tree8b00c8ae908ec481403de93e60ccb7026815a7fa
parent0c37dd7a9052529cd9346b04530be7878c03e429
V4L/DVB (9054): implement proper locking in the dvb ca en50221 driver

Concurrent access to a single DVB CA 50221 interface slot is generally
discouraged. The underlying drivers (budget-av, budget-ci) do not implement
proper locking and thus two transactions could (and do) interfere with on
another.

This fixes the following problems seen by others and myself:

 - sudden i/o errors when writing to the ci device which usually would
   result in an undefined state of the hw and require a software restart

 - errors about the CAM trying to send a buffer larger than the agreed size
   usually also resulting in an undefined state of the hw

Due the to design of the DVB CA 50221 driver, implementing the locks in the
underlying drivers would not be enough and still leave some race conditions,
even though they were harder to trigger.

Signed-off-by: Matthias Dahl <devel@mortal-soul.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/dvb-core/dvb_ca_en50221.c
drivers/media/dvb/dvb-core/dvb_ca_en50221.h