From owner-freebsd-multimedia@FreeBSD.ORG Thu Sep 27 05:37:16 2012 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 684A7106564A for ; Thu, 27 Sep 2012 05:37:16 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe01.c2i.net [212.247.154.2]) by mx1.freebsd.org (Postfix) with ESMTP id EA3268FC0C for ; Thu, 27 Sep 2012 05:37:15 +0000 (UTC) X-T2-Spam-Status: No, hits=-1.0 required=5.0 tests=ALL_TRUSTED Received: from [176.74.213.204] (account mc467741@c2i.net HELO laptop015.hselasky.homeunix.org) by mailfe01.swip.net (CommuniGate Pro SMTP 5.4.4) with ESMTPA id 327106441; Thu, 27 Sep 2012 07:37:13 +0200 From: Hans Petter Selasky To: freebsd-multimedia@freebsd.org Date: Thu, 27 Sep 2012 07:38:36 +0200 User-Agent: KMail/1.13.7 (FreeBSD/9.1-PRERELEASE; KDE/4.8.4; amd64; ; ) References: <20120812154930.GA23878@triton8.kn-bremen.de> <20120926200656.GA60363@triton8.kn-bremen.de> In-Reply-To: <20120926200656.GA60363@triton8.kn-bremen.de> X-Face: 'mmZ:T{)),Oru^0c+/}w'`gU1$ubmG?lp!=R4Wy\ELYo2)@'UZ24N@d2+AyewRX}mAm; Yp |U[@, _z/([?1bCfM{_"B<.J>mICJCHAzzGHI{y7{%JVz%R~yJHIji`y>Y}k1C4TfysrsUI -%GU9V5]iUZF&nRn9mJ'?&>O MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201209270738.36691.hselasky@c2i.net> Cc: Juergen Lock Subject: Re: In case mythtv setup is broken for you too... X-BeenThere: freebsd-multimedia@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Multimedia discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Sep 2012 05:37:16 -0000 On Wednesday 26 September 2012 22:06:56 Juergen Lock wrote: > On Sun, Aug 12, 2012 at 05:49:30PM +0200, Juergen Lock wrote: > > Hi! > > > > (I guess I should post here too :) > > > > If mythtv setup is broken for you reporting a failed FE_GET_INFO ioctl > > > > like reported in this mythtv ticket: > > http://code.mythtv.org/trac/ticket/10830 > > > > (reduced testcase: > > http://people.freebsd.org/~nox/tmp/ioctltst.c > > > > ) try this media tree patch I posted a little while ago: (i.e. apply it > > to webcamd, there's a Download patch link at the top) > > > > http://patchwork.linuxtv.org/patch/13563/ > > > > The full thread in case you want to help testing/reviewing the patch > > > > for upstream Linux: > > http://thread.gmane.org/gmane.linux.drivers.video-input- infrastructure/5 > > 1644 > > The patch needed a small tweak for webcamd 3.7.0.3, maybe we should > add it to EXTRA_PATCHES as an OPTION? > > --- media_tree/drivers/media/dvb-core/dvb_frontend.c.orig > +++ media_tree/drivers/media/dvb-core/dvb_frontend.c > @@ -603,6 +603,7 @@ static int dvb_frontend_thread(void *dat > enum dvbfe_algo algo; > > bool re_tune = false; > + bool semheld = false; > > dev_dbg(fe->dvb->device, "%s:\n", __func__); > > @@ -626,6 +627,8 @@ restart: > > if (kthread_should_stop() || dvb_frontend_is_exiting(fe)) { > /* got signal or quitting */ > + if (!down_interruptible (&fepriv->sem)) > + semheld = true; > fepriv->exit = DVB_FE_NORMAL_EXIT; > break; > } > @@ -741,6 +744,8 @@ restart: > fepriv->exit = DVB_FE_NO_EXIT; > mb(); > > + if (semheld) > + up(&fepriv->sem); > dvb_frontend_wakeup(fe); > return 0; > } > @@ -1819,16 +1824,20 @@ static int dvb_frontend_ioctl(struct fil > int err = -ENOTTY; > > dev_dbg(fe->dvb->device, "%s: (%d)\n", __func__, _IOC_NR(cmd)); > - if (fepriv->exit != DVB_FE_NO_EXIT) > + if (down_interruptible (&fepriv->sem)) > + return -ERESTARTSYS; > + > + if (fepriv->exit != DVB_FE_NO_EXIT) { > + up(&fepriv->sem); > return -ENODEV; > + } > > if ((file->f_flags & O_ACCMODE) == O_RDONLY && > (_IOC_DIR(cmd) != _IOC_READ || cmd == FE_GET_EVENT || > - cmd == FE_DISEQC_RECV_SLAVE_REPLY)) > + cmd == FE_DISEQC_RECV_SLAVE_REPLY)) { > + up(&fepriv->sem); > return -EPERM; > - > - if (down_interruptible (&fepriv->sem)) > - return -ERESTARTSYS; > + } > > if ((cmd == FE_SET_PROPERTY) || (cmd == FE_GET_PROPERTY)) > err = dvb_frontend_ioctl_properties(file, cmd, parg); Why are the media developers not taking this patch into the repo? --HPS