Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Re: FW: [vdr] Re: error during replay



On Mon, Jun 03, 2002 at 06:41:16PM +0200, mocm@metzlerbros.de wrote:
> michael dawart writes:
>  > no
>  > 
> 
> Don't top post.
> Your answer was probably to the question:
> 
>  > Does it happen with ntuxplayer ?
> 
> And in that case, it is not a driver problem.

Does this mean that trouble with OSD commands isn't a driver
problem?  What do you think about the included patch?
It may help to protect the arm thread from pending OSD ioctls.

With this simple change the semaphore dcomlock is used to
avoid mixing of the STATUS_LOOPS rdebi request with a
pending OSD request.  Before reseting/rebooting the arm
the semaphore has to be released because in the arm_error
some outcom are called ... whereas during the ddelay no
pending OSD command should be rised.



           Werner

------------------------------------------------------------------
--- dvb.c
+++ dvb.c	Mon Jun  3 16:19:00 2002
@@ -404,7 +404,9 @@
                 printk("OOPS, no current->files\n");
                 reset_arm(dvb);
         }
+	down_interruptible(&dvb->dcomlock);
         ddelay(10); 
+	up(&dvb->dcomlock);
         dvb_frontend_demod_command(&dvb->frontend, FE_INIT, 0); 
 
 	memcpy (&dvb->frontend.new_param, 
@@ -444,13 +446,17 @@
 			break;
                 if (!dvb->arm_ready)
                         continue;
+		down_interruptible(&dvb->dcomlock);
                 newloops=rdebi(dvb, DEBINOSWAP, STATUS_LOOPS, 0, 2);
                 if (newloops==dvb->arm_loops) {
                         printk("dvb%d: ARM crashed!\n", dvb->num);
+			up(&dvb->dcomlock);
                         arm_error(dvb);
+			down_interruptible(&dvb->dcomlock);
                         newloops=rdebi(dvb, DEBINOSWAP, STATUS_LOOPS, 0, 2)-1;
                 }
                 dvb->arm_loops=newloops;
+		up(&dvb->dcomlock);
 	}
 	dvb->arm_thread = NULL;
 	return 0;


-- 
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index