From owner-freebsd-multimedia@FreeBSD.ORG Mon Feb 26 03:59:06 2007 Return-Path: X-Original-To: freebsd-multimedia@freebsd.org 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 3995C16A402 for ; Mon, 26 Feb 2007 03:59:06 +0000 (UTC) (envelope-from grog@lemis.com) Received: from ext-gw.lemis.com (ext-gw.lemis.com [150.101.14.10]) by mx1.freebsd.org (Postfix) with ESMTP id BC60813C461 for ; Mon, 26 Feb 2007 03:59:05 +0000 (UTC) (envelope-from grog@lemis.com) Received: from wantadilla.lemis.com (wantadilla.lemis.com [192.109.197.135]) by ext-gw.lemis.com (Postfix) with ESMTP id A78D4133C67; Mon, 26 Feb 2007 14:29:04 +1030 (CST) Received: by wantadilla.lemis.com (Postfix, from userid 1004) id A129B1A9CBE; Mon, 26 Feb 2007 14:29:04 +1030 (CST) Date: Mon, 26 Feb 2007 14:29:04 +1030 From: Greg 'groggy' Lehey To: usleepless@gmail.com Message-ID: <20070226035904.GA77076@wantadilla.lemis.com> References: <4E6EF7B9-703F-4D86-A86E-A0B0B7B504F0@netmusician.org> <20070224014517.GN70738@wantadilla.lemis.com> <20070224092239.6312604b.torfinn.ingolfsen@broadpark.no> <20070225022427.GB1950@wantadilla.lemis.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="RnlQjJ0d97Da+TV1" Content-Disposition: inline In-Reply-To: <20070225022427.GB1950@wantadilla.lemis.com> User-Agent: Mutt/1.4.2.1i Organization: The FreeBSD Project Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-418-838-708 VoIP: sip:0871270137@sip.internode.on.net WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 Cc: freebsd-multimedia@freebsd.org Subject: Re: pvr250 and MythTV 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: Mon, 26 Feb 2007 03:59:06 -0000 --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 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--