On Sun, 2006-04-09 at 23:31 +0200, Guennadi Liakhovetski wrote: > Good guess. It hangs then.
I can't see what would cause a lock if calling ftdi_set_termios() twice. My guess is calling it twice is creating some interrupt or status event that ends up trying to operate on the dummy tty. Using your patch for checking tty == NULL, this is not a problem. If you want to pursue this further, leave the double set_termios call in place and enable usb debug output. > For your amusement below is one more Oops, this time again from ppc it > happens if you boot with "console=ttyUSB0" but without a dongle, and then > plug it in: > Oops: Exception in kernel mode, sig: 4 [#1] > PREEMPT > NIP: C0299DDC LR: C0016DE4 SP: C7D05CB0 REGS: c7d05c00 TRAP: 0700 Not > tainted > MSR: 00089032 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11 > TASK = c7c1b050[24] 'khubd' THREAD: c7d04000 > Last syscall: -1 > GPR00: C0299DDC C7D05CB0 C7C1B050 C025C1D0 C024A010 C02A618A C6F1C9D0 00000020 > GPR08: 00000000 FFFFFFFF C6E8E418 C7D04000 84428828 1003A92C C6E8E4B4 C02A0000 > GPR16: 00000001 00000000 00000001 00000000 00000001 C0178084 C025C0AC C0230000 > GPR24: C01780F8 C6E8E418 C6E0AB20 C0250000 C02A6184 00000000 C025C1D0 C02A6184 > NIP [c0299ddc] usb_console_setup+0x0/0x36c > LR [c0016de4] register_console+0x234/0x288 > Call trace: > [c017a8e4] usb_serial_console_init+0x40/0x64 Try removing __init from the declaration of usb_console_setup in usb/serial/console.c > Besides, if after booting with the dongle and "console=ttyUSB0" you unplug > the dongle you get > > drivers/usb/serial/ftdi_sio.c: ftdi_write - failed submitting write urb, > error -19 There does not seem to be any code that unregisters the USB device as a console when unplugged. These write failures (ENODEV) are probably from console messages being sent to ftdi_write (through usb_console_write) after the USB device is gone. I need to look a little closer at this to understand what needs to be be done. -- Paul Fulghum Microgate Systems, Ltd ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel