em28xx: dvb lock bug on re-plug of device?
Hi all, I wonder if Devin/Mauro could help me with something as I've run into a problem developing a driver for the PCTV 290e? First plug of the device works fine, em28xx and em28xx_dvb are loaded. However, if I disconnect and then re-plug the device, the em28xx_dvb module will hang in dvb_init() where it performs mutex_lock(dev-lock); It looks like the code to handle udev locking runs into a problem if the em28xx_dvb is already loaded. I'm referring to this: https://patchwork.kernel.org/patch/91160/ I don't have any other em28xx DVB devices to test against at the moment. I have modified dvb_init to give up if it doesn't get a lock straight away. This is not a valid fix, but it means I can run rmmod instead of rebooting. Below is a copy of khubd's complaint about the hangup. I pulled from media_tree.git. Perhaps this is already fixed in another branch? Thanks. [31498.792677] INFO: task khubd:28 blocked for more than 120 seconds. [31498.792682] echo 0 /proc/sys/kernel/hung_task_timeout_secs disables this message. [31498.792685] khubd D 880232d59a58 028 2 0x [31498.792689] 880232d4d6b0 0046 880232d4d600 81036bb9 [31498.792692] 00013a80 880232d596c0 880232d59a58 880232d4dfd8 [31498.792695] 880232d59a60 00013a80 880232d4c010 00013a80 [31498.792699] Call Trace: [31498.792708] [81036bb9] ? default_spin_lock_flags+0x9/0x10 [31498.792714] [81598817] __mutex_lock_slowpath+0xf7/0x180 [31498.792717] [815986fb] mutex_lock+0x2b/0x50 [31498.792722] [a07f43c9] dvb_init+0x69/0xc20 [em28xx_dvb] [31498.792730] [a07a84c2] em28xx_init_extension+0x42/0x70 [em28xx] [31498.792735] [a07a7e89] em28xx_usb_probe+0x6a9/0xb10 [em28xx] [31498.792741] [814173c3] usb_probe_interface+0xf3/0x210 [31498.792746] [813979f6] driver_probe_device+0x96/0x1c0 [31498.792749] [81397bc0] ? __device_attach+0x0/0x60 [31498.792751] [81397c13] __device_attach+0x53/0x60 [31498.792755] [81396a88] bus_for_each_drv+0x68/0x90 [31498.792757] [81397cdf] device_attach+0x8f/0xb0 [31498.792760] [8139685d] bus_probe_device+0x2d/0x50 [31498.792764] [813951c9] device_add+0x639/0x710 [31498.792767] [81393a01] ? dev_set_name+0x41/0x50 [31498.792770] [81415a26] usb_set_configuration+0x606/0x6d0 [31498.792774] [8141f064] generic_probe+0x44/0xa0 [31498.792777] [81416c10] usb_probe_device+0x30/0x60 [31498.792779] [813979f6] driver_probe_device+0x96/0x1c0 [31498.792782] [81397bc0] ? __device_attach+0x0/0x60 [31498.792784] [81397c13] __device_attach+0x53/0x60 [31498.792787] [81396a88] bus_for_each_drv+0x68/0x90 [31498.792789] [81397cdf] device_attach+0x8f/0xb0 [31498.792792] [8139685d] bus_probe_device+0x2d/0x50 [31498.792795] [813951c9] device_add+0x639/0x710 [31498.792797] [81415279] ? usb_cache_string+0x99/0xb0 [31498.792800] [8140e3cb] usb_new_device+0x9b/0x140 [31498.792803] [8140f428] hub_thread+0xc18/0x11a0 [31498.792806] [8105afee] ? dequeue_task_fair+0x29e/0x2b0 [31498.792811] [81083000] ? autoremove_wake_function+0x0/0x40 [31498.792813] [8140e810] ? hub_thread+0x0/0x11a0 [31498.792816] [81082ab6] kthread+0x96/0xa0 [31498.792820] [8100cde4] kernel_thread_helper+0x4/0x10 [31498.792823] [81082a20] ? kthread+0x0/0xa0 [31498.792825] [8100cde0] ? kernel_thread_helper+0x0/0x10 [31498.792868] INFO: task usb_id:19221 blocked for more than 120 seconds. [31498.792870] echo 0 /proc/sys/kernel/hung_task_timeout_secs disables this message. [31498.792872] usb_id D 8802016b8398 0 19221 1 0x [31498.792875] 88018ac9fda8 0082 03a65c58 [31498.792878] 00013a80 8802016b8000 8802016b8398 88018ac9ffd8 [31498.792882] 8802016b83a0 00013a80 88018ac9e010 00013a80 [31498.792885] Call Trace: [31498.792888] [81598817] __mutex_lock_slowpath+0xf7/0x180 [31498.792891] [815986fb] mutex_lock+0x2b/0x50 [31498.792895] [8141a51f] show_manufacturer+0x2f/0x70 [31498.792898] [81393a37] dev_attr_show+0x27/0x50 [31498.792904] [8110abae] ? __get_free_pages+0xe/0x50 [31498.792910] [811c6e9e] sysfs_read_file+0xce/0x1c0 [31498.792914] [81159995] vfs_read+0xc5/0x190 [31498.792916] [81159b61] sys_read+0x51/0x90 [31498.792922] [8100bfc2] system_call_fastpath+0x16/0x1b -- Steve Kerrison MEng Hons. http://www.stevekerrison.com/ -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: em28xx: dvb lock bug on re-plug of device?
On Thu, Mar 3, 2011 at 11:01 AM, Steve Kerrison st...@stevekerrison.com wrote: Hi all, I wonder if Devin/Mauro could help me with something as I've run into a problem developing a driver for the PCTV 290e? First plug of the device works fine, em28xx and em28xx_dvb are loaded. However, if I disconnect and then re-plug the device, the em28xx_dvb module will hang in dvb_init() where it performs mutex_lock(dev-lock); Hi Steve, I saw this too and brought it to Mauro's attention some months ago (because I believed strongly it was related to locking changes). It looks like he never did anything to address it though (and I've been working on other bridges so haven't had any time to dig into it). So, for what it's worth, I can confirm the problem that you are experiencing. Devin -- Devin J. Heitmueller - Kernel Labs http://www.kernellabs.com -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: em28xx: dvb lock bug on re-plug of device?
Re-sending due to HTML accident. Thank you Devin, that is useful to know. It means I can have some confidence in the problem not being caused by my actions. I will focus my efforts on getting the device working in spite of this, but might have a chance to look into this bug thereafter. Regards, -- Steve Kerrison MEng Hons. http://www.stevekerrison.com/ On Thu, 2011-03-03 at 11:07 -0500, Devin Heitmueller wrote: On Thu, Mar 3, 2011 at 11:01 AM, Steve Kerrison st...@stevekerrison.com wrote: Hi all, I wonder if Devin/Mauro could help me with something as I've run into a problem developing a driver for the PCTV 290e? First plug of the device works fine, em28xx and em28xx_dvb are loaded. However, if I disconnect and then re-plug the device, the em28xx_dvb module will hang in dvb_init() where it performs mutex_lock(dev-lock); Hi Steve, I saw this too and brought it to Mauro's attention some months ago (because I believed strongly it was related to locking changes). It looks like he never did anything to address it though (and I've been working on other bridges so haven't had any time to dig into it). So, for what it's worth, I can confirm the problem that you are experiencing. Devin -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html