From owner-freebsd-multimedia@FreeBSD.ORG Sun Jan 9 20:51:44 2011 Return-Path: Delivered-To: freebsd-multimedia@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 117A4106564A for ; Sun, 9 Jan 2011 20:51:44 +0000 (UTC) (envelope-from gallatin@gmail.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id BC40F8FC16 for ; Sun, 9 Jan 2011 20:51:43 +0000 (UTC) Received: by gyf3 with SMTP id 3so7695324gyf.13 for ; Sun, 09 Jan 2011 12:51:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=ftGbZcYgGx1bKbno05PXrYGdwNa9xmY1mzveM4SZff8=; b=gdFDSVvMHflfN21DIqHzN9H+lpmPai8AECqrAvvEzDwLeHJmRGW7/BYsEww7aiq1ym jpXnkmrj36LYgZaAGpSi7AkClElxob7U5Gz4VQ+tpsuCA4CnVDZgg01PXT+nsjIJgoV+ 3Ijk885bb6DKzdAekg7GPaKEdluFJgFWc+JbU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=eLQ0miuObKajyyPGNmduwI7CwaH6kiZOxnq8zAbNdfzgoZ2FeaJxAA1XCaw8bqBHQo VyGyqD6qPeJMHjoy2IVWt/scQuoqaJKfM3a2qtR8OWKigPrlH1CB7y5eQDiOc2MxJPUQ WNkDNKlqezubP8WGrVHK2sbpVv2PAIw6XNBmA= MIME-Version: 1.0 Received: by 10.100.57.15 with SMTP id f15mr3753944ana.228.1294606302762; Sun, 09 Jan 2011 12:51:42 -0800 (PST) Received: by 10.100.248.15 with HTTP; Sun, 9 Jan 2011 12:51:42 -0800 (PST) In-Reply-To: References: <201101082130.05180.hselasky@c2i.net> Date: Sun, 9 Jan 2011 15:51:42 -0500 Message-ID: From: Andrew Gallatin To: Hans Petter Selasky Content-Type: multipart/mixed; boundary=0016e6509cb8ccd5a304997004fb Cc: freebsd-multimedia@freebsd.org Subject: Re: em28xx? 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: Sun, 09 Jan 2011 20:51:44 -0000 --0016e6509cb8ccd5a304997004fb Content-Type: text/plain; charset=ISO-8859-1 Ahah! Apparently linux mutexes are recursive! The driver holds dev->mutex and tries to lock it again. If I comment out the outer level of taking/releasing the mutex (attached) then the driver fully attaches. I guess a better patch would be to make the mutexes in your shim layer recursive as well. At any rate, I now see: em28xx: New device @ 480 Mbps (1b80:a340, interface 0, class 0) em28xx #0: chip ID is em2870 em28xx #0: i2c eeprom 00: 1a eb 67 95 80 1b 40 a3 c0 13 6b 10 6a 22 00 00 em28xx #0: i2c eeprom 10: 00 00 04 57 00 0d 00 00 00 00 00 00 00 00 00 00 em28xx #0: i2c eeprom 20: 44 00 00 00 f0 10 01 00 00 00 00 00 5b 1c c0 00 em28xx #0: i2c eeprom 30: 00 00 20 40 20 80 02 20 01 01 00 00 00 00 00 00 em28xx #0: i2c eeprom 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 em28xx #0: i2c eeprom 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 em28xx #0: i2c eeprom 60: 00 00 00 00 00 00 00 00 00 00 22 03 55 00 53 00 em28xx #0: i2c eeprom 70: 42 00 20 00 32 00 38 00 37 00 30 00 20 00 44 00 em28xx #0: i2c eeprom 80: 65 00 76 00 69 00 63 00 65 00 00 00 00 00 00 00 em28xx #0: i2c eeprom 90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 em28xx #0: i2c eeprom a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 em28xx #0: i2c eeprom b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 em28xx #0: i2c eeprom c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 em28xx #0: i2c eeprom d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 em28xx #0: i2c eeprom e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 em28xx #0: i2c eeprom f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 em28xx #0: EEPROM ID= 0x9567eb1a, EEPROM hash = 0x2888a312 em28xx #0: EEPROM info: em28xx #0: No audio on board. em28xx #0: 500mA max power em28xx #0: Table at 0x04, strings=0x226a, 0x0000, 0x0000 em28xx #0: Identified as KWorld PlusTV 340U or UB435-Q (ATSC) (card=76) em28xx #0: v4l2 driver version 0.1.2 em28xx #0: V4L2 video device registered as video0 tda18271 129-0060: creating new instance TDA18271HD/C1 detected @ 129-0060 DVB: registering new adapter (em28xx #0) DVB: registering adapter 0 frontend 0 (LG Electronics LGDT3304 VSB/QAM Frontend)... em28xx #0: Successfully loaded em28xx-dvb Creating /dev/video0 Creating /dev/dvb/adapter0/demux0 Creating /dev/dvb/adapter0/dvr0 Creating /dev/dvb/adapter0/frontend0 Hurray!! Drew --0016e6509cb8ccd5a304997004fb Content-Type: text/x-patch; charset=US-ASCII; name="recursion.diff" Content-Disposition: attachment; filename="recursion.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_giqf3wkb0 LS0tIC91c3IvcG9ydHMvbXVsdGltZWRpYS93ZWJjYW1kL3dvcmsvd2ViY2FtZC0wLjEuMTgvdjRs LWR2Yi9saW51eC9kcml2ZXJzL21lZGlhL3ZpZGVvL2VtMjh4eC9lbTI4eHgtY2FyZHMuYwkyMDEw LTA3LTAxIDIzOjM4OjU0LjAwMDAwMDAwMCAtMDQwMAorKysgdjRsLWR2Yi9saW51eC9kcml2ZXJz L21lZGlhL3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