I am trying to get a system working with the gadget serial driver, I need userland apps to change behaviour when connected to a PC (and enumerated). The driver detects this event and prints a message, but no hotplug event fires. The tty is created at driver load time (i.e. on boot). Is there some way I can / should be detecting this event from userland? Maybe some kind of ioctl on the gadget serial tty? Also, I was getting a WARNING backtrace (pasted below) as soon as I sent data into the linux box until I found this in the archives: http://lkml.indiana.edu/hypermail/linux/kernel/0906.2/03650.html I commented out the "low_latency = 1" in gadget/u_serial.c and the problem seems to have gone away. WARNING: at kernel/mutex.c:207 __mutex_lock_slowpath+0x78/0x290() Modules linked in: g_serial musb_hdrc Backtrace: [<c002922c>] (dump_backtrace+0x0/0x114) from [<c0255b5c>] (dump_stack+0x18/0x1c) r7:00000000 r6:c0256edc r5:c02cd8ac r4:000000cf [<c0255b44>] (dump_stack+0x0/0x1c) from [<c0039d50>] (warn_slowpath_common+0x50/0x68) [<c0039d00>] (warn_slowpath_common+0x0/0x68) from [<c0039d80>] (warn_slowpath_null+0x18/0x1c) r7:c7f50320 r6:c7e36000 r5:c7e363e0 r4:c7f5c000 [<c0039d68>] (warn_slowpath_null+0x0/0x1c) from [<c0256edc>] (__mutex_lock_slowpath+0x78/0x290) [<c0256e64>] (__mutex_lock_slowpath+0x0/0x290) from [<c0257108>] (mutex_lock+0x14/0x28) r8:00000010 r7:00000000 r6:c7e36000 r5:c7e363e0 r4:c7e363e0 [<c02570f4>] (mutex_lock+0x0/0x28) from [<c0152a58>] (echo_set_canon_col+0x1c/0x40) r5:c7e363e0 r4:c7e36000 [<c0152a3c>] (echo_set_canon_col+0x0/0x40) from [<c0154ebc>] (n_tty_receive_buf+0xc4c/0xefc) r5:00000077 r4:00000012 [<c0154270>] (n_tty_receive_buf+0x0/0xefc) from [<c015767c>] (flush_to_ldisc+0x130/0x1e8) [<c015754c>] (flush_to_ldisc+0x0/0x1e8) from [<c01577a4>] (tty_flip_buffer_push+0x70/0x80) [<c0157734>] (tty_flip_buffer_push+0x0/0x80) from [<bf03d0b4>] (gs_rx_push+0x168/0x258 [g_serial]) r5:c7e56980 r4:00000010 [<bf03cf4c>] (gs_rx_push+0x0/0x258 [g_serial]) from [<c003f17c>] (tasklet_action+0x84/0xf0) [<c003f0f8>] (tasklet_action+0x0/0xf0) from [<c003f854>] (__do_softirq+0x98/0x12c) r5:00000018 r4:00000104 [<c003f7bc>] (__do_softirq+0x0/0x12c) from [<c003f938>] (irq_exit+0x50/0xa8) [<c003f8e8>] (irq_exit+0x0/0xa8) from [<c0025078>] (asm_do_IRQ+0x78/0x94) [<c0025000>] (asm_do_IRQ+0x0/0x94) from [<c0025b2c>] (__irq_svc+0x4c/0x90) Exception stack(0xc7f5dd38 to 0xc7f5dd80) dd20: 00000000 00000002 dd40: c7f5dd48 40000013 00000000 c7e56980 00000000 c7f5c000 c7e36000 00000000 dd60: bf03e83c c7f5dda4 c7f5dd48 c7f5dd80 bf03c07c bf03cf08 40000013 ffffffff r5:fec48000 r4:ffffffff [<bf03cd0c>] (gs_open+0x0/0x240 [g_serial]) from [<c0152500>] (tty_open+0x354/0x538) [<c01521ac>] (tty_open+0x0/0x538) from [<c009b1e0>] (chrdev_open+0x1c0/0x1e0) [<c009b020>] (chrdev_open+0x0/0x1e0) from [<c00961c0>] (__dentry_open+0x174/0x290) r8:c7cc8680 r7:c009b020 r6:c7839e38 r5:c7e51d80 r4:00000000 [<c009604c>] (__dentry_open+0x0/0x290) from [<c00963b8>] (nameidata_to_filp+0x4c/0x64) [<c009636c>] (nameidata_to_filp+0x0/0x64) from [<c00a28b8>] (do_last+0x488/0x5e4) r5:00000000 r4:00000000 [<c00a2430>] (do_last+0x0/0x5e4) from [<c00a44d0>] (do_filp_open+0x174/0x4f8) [<c00a435c>] (do_filp_open+0x0/0x4f8) from [<c0095f38>] (do_sys_open+0x64/0x11c) [<c0095ed4>] (do_sys_open+0x0/0x11c) from [<c0096028>] (sys_open+0x24/0x28) [<c0096004>] (sys_open+0x0/0x28) from [<c0025f20>] (ret_fast_syscall+0x0/0x2c) Thanks, -- Jon Povey jon.povey@xxxxxxxxxxxxxxx Racelogic is a limited company registered in England. Registered number 2743719 . Registered Office Unit 10, Swan Business Centre, Osier Way, Buckingham, Bucks, MK18 1TB . The information contained in this electronic mail transmission is intended by Racelogic Ltd for the use of the named individual or entity to which it is directed and may contain information that is confidential or privileged. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email so that the sender's address records can be corrected. The views expressed by the sender of this communication do not necessarily represent those of Racelogic Ltd. Please note that Racelogic reserves the right to monitor e-mail communications passing through its network -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html