Date: Sun, 9 Jan 2011 15:51:42 -0500 From: Andrew Gallatin <gallatin@gmail.com> To: Hans Petter Selasky <hselasky@c2i.net> Cc: freebsd-multimedia@freebsd.org Subject: Re: em28xx? Message-ID: <AANLkTim8rAEsmonUvQoQ%2Bt4=K4OqGJ74G7HZW-9onn4Q@mail.gmail.com> In-Reply-To: <AANLkTikkBcP-CmqSgJpQP4t7Dz4iUR_UkOJogtE-Q=yi@mail.gmail.com> References: <AANLkTimhh9qt1mwMk0NJ0_XP2W14azixpKD=fZYYpOpi@mail.gmail.com> <AANLkTimOtABnMgkNn9jAiThWmZ9Ec3pNQ%2Bq_GR_1Ae4h@mail.gmail.com> <201101082130.05180.hselasky@c2i.net> <AANLkTikkBcP-CmqSgJpQP4t7Dz4iUR_UkOJogtE-Q=yi@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #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
[-- Attachment #2 --]
--- /usr/ports/multimedia/webcamd/work/webcamd-0.1.18/v4l-dvb/linux/drivers/media/video/em28xx/em28xx-cards.c 2010-07-01 23:38:54.000000000 -0400
+++ v4l-dvb/linux/drivers/media/video/em28xx/em28xx-cards.c 2011-01-09 15:48:45.657851490 -0500
@@ -3164,7 +3164,7 @@ static int em28xx_usb_probe(struct usb_i
/* allocate device struct */
mutex_init(&dev->lock);
- mutex_lock(&dev->lock);
+// mutex_lock(&dev->lock);
retval = em28xx_init_dev(&dev, udev, interface, nr);
if (retval) {
em28xx_devused &= ~(1<<dev->devno);
@@ -3181,7 +3181,7 @@ static int em28xx_usb_probe(struct usb_i
/* Should be the last thing to do, to avoid newer udev's to
open the device before fully initializing it
*/
- mutex_unlock(&dev->lock);
+// mutex_unlock(&dev->lock);
return 0;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTim8rAEsmonUvQoQ%2Bt4=K4OqGJ74G7HZW-9onn4Q>
