[linux-dvb] [PATCH] budget_av / dvb_ca_en50221: fixes ci/cam handling especially on SMP machines

Matthias Dahl mldvb at mortal-soul.de
Fri Aug 22 15:55:24 CEST 2008

Hi Oliver.

I can happily report that with the following two patches applied, I haven't 
seen a single case where the cam stopped working due to i/o errors or 
anything like it.

The budget_av patch is basically your patch just a bit extended which I 
thought was necessary to cover all relevant cases. Works just fine.

The dvb_ca_en50221 patch introduces the concept of slot lock that means, you 
can either read or write to a slot but concurrent i/o on a slot is no longer 
allowed. This case was already thought of and partly taken care of but 
unfortunately due to the missing locking mechanism, it just made the race 
condition harder to trigger but not impossible... especially on SMP systems 
where this is easier to hit. That's way I introduced a mutex. I left the 
original check in there but it actually never should get triggered anymore. 
Right now actually, if it gets triggered, one could assume the ci/cam is in 
an undefined state and trigger a reinit, like it's done on a few other 

Could you please apply those patches to the dvb tree and maybe get into the 
official 2.6.27? Those bugs haven been around for quite some time now and 
without the patches, they are not so hard to trigger.

Thanks a lot for your help by the way!

So long,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: budget-av_camlock_2.diff
Type: text/x-diff
Size: 6759 bytes
Desc: not available
Url : http://www.linuxtv.org/pipermail/linux-dvb/attachments/20080822/6d053a38/attachment.diff 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dvb_ca_en50221.c.v1.patch
Type: text/x-diff
Size: 2340 bytes
Desc: not available
Url : http://www.linuxtv.org/pipermail/linux-dvb/attachments/20080822/6d053a38/attachment.patch 

More information about the linux-dvb mailing list