Date: Mon, 26 Feb 2007 14:29:04 +1030 From: Greg 'groggy' Lehey <grog@FreeBSD.org> To: usleepless@gmail.com Cc: freebsd-multimedia@freebsd.org Subject: Re: pvr250 and MythTV Message-ID: <20070226035904.GA77076@wantadilla.lemis.com> In-Reply-To: <20070225022427.GB1950@wantadilla.lemis.com> References: <4E6EF7B9-703F-4D86-A86E-A0B0B7B504F0@netmusician.org> <20070224014517.GN70738@wantadilla.lemis.com> <20070224092239.6312604b.torfinn.ingolfsen@broadpark.no> <B6F9F8DE-A063-4C8B-B406-61D279586F31@netmusician.org> <c39ec84c0702240135l24c15326k775511dd8d375284@mail.gmail.com> <20070225022427.GB1950@wantadilla.lemis.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--RnlQjJ0d97Da+TV1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sunday, 25 February 2007 at 12:54:27 +1030, Greg 'groggy' Lehey wrote: > On Saturday, 24 February 2007 at 10:35:37 +0100, usleepless@gmail.com wrote: >> List, Torfinn, Greg, Joe, >> >> On 2/24/07, Joe Auty <joe@netmusician.org> wrote: >>> Does the driver work with the 250? Didn't want to track down the >>> required CD file and install this to replace my working driver if >>> this wasn't going to bear any fruit... >> >> it does. files are attached. place the pvrxxx_gpl.tgz in >> /usr/ports/distfiles, extract pvrxxx_port.tgz to >> /usr/ports/multimedia. >> >> let me know. > > I've tried this with a PVR 250. It panics out of cxm_read with a call > to msleep holding a mutex (IIRC). I'm having difficulty getting a > dump of this machine, so it may take a little longer to localize. OK, the reason for the dump was a non-intuitive requirement of msleep(): if you want to sleep forever, you need to be holding a mutex. I'm trying to clarify the reasons for this, but for the moment the following patch works around the "feature": --- cxm.c~ Sun Feb 25 11:17:46 2007 +++ cxm.c Mon Feb 26 10:46:21 2007 @@ -2640,7 +2640,14 @@ if(!sc->encoding || sc->encoding_eos) return ENXIO; - error = tsleep(&sc->enc_pool.read, PZERO | PCATCH, "cmxrd", 0); + /* + * We're not allowed to give a 0 timeout without holding + * a mutex, so work around this "feature" like this. + */ + while ((error = tsleep(&sc->enc_pool.read, + PZERO | PCATCH, "cmxrd", + 3600 * hz)) + == EWOULDBLOCK ); if(error) return error; Why has nobody else seen this? It only happens if you set the INVARIANTS option in the kernel build. I have some other minor issues, but on the whole things seem to work in my environment (PVR 250, Pentium, 6.2-STABLE). Greg -- See complete headers for address and phone numbers. --RnlQjJ0d97Da+TV1 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) iD8DBQFF4lsIIubykFB6QiMRAizAAJ47k6lBKOSDURtWidy/byW4NQre3QCfWzEw rvNwWpJd7jcTlP/yEFtRkHY= =Iei+ -----END PGP SIGNATURE----- --RnlQjJ0d97Da+TV1--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070226035904.GA77076>