aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/dvb/dvb-core/dvb_ca_en50221.h
diff options
context:
space:
mode:
authorMatthias Dahl <mldvb@mortal-soul.de>2008-09-26 06:29:03 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-01-29 08:35:37 -0200
commitd7e43844e40e07cadc48f1733b9738659f83b38c (patch)
tree8b00c8ae908ec481403de93e60ccb7026815a7fa /drivers/media/dvb/dvb-core/dvb_ca_en50221.h
parent0c37dd7a9052529cd9346b04530be7878c03e429 (diff)
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>
Diffstat (limited to 'drivers/media/dvb/dvb-core/dvb_ca_en50221.h')
-rw-r--r--drivers/media/dvb/dvb-core/dvb_ca_en50221.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/dvb/dvb-core/dvb_ca_en50221.h b/drivers/media/dvb/dvb-core/dvb_ca_en50221.h
index 8467e63ddc0..7df2e141187 100644
--- a/drivers/media/dvb/dvb-core/dvb_ca_en50221.h
+++ b/drivers/media/dvb/dvb-core/dvb_ca_en50221.h
@@ -45,8 +45,10 @@ struct dvb_ca_en50221 {
/* the module owning this structure */
struct module* owner;
- /* NOTE: the read_*, write_* and poll_slot_status functions must use locks as
- * they may be called from several threads at once */
+ /* NOTE: the read_*, write_* and poll_slot_status functions will be
+ * called for different slots concurrently and need to use locks where
+ * and if appropriate. There will be no concurrent access to one slot.
+ */
/* functions for accessing attribute memory on the CAM */
int (*read_attribute_mem)(struct dvb_ca_en50221* ca, int slot, int address);