On Sat, 8 Apr 2006, Paul Fulghum wrote:

> On Sat, 2006-04-08 at 23:16 +0200, Guennadi Liakhovetski wrote:
> > On Sat, 8 Apr 2006, Paul Fulghum wrote:
> > > OK, this one backs out my usb_console_setup change
> > > that uses the temp tty structure for the device specific open.
> > > 
> > > Included is:
> > > * improved usb serial_open fix (fix ENODEV)
> > > * improved usb_console_write fix (fix CR after LF)
> > > * your original ftdi patch (fix oops on tty struct == NULL)
> > 
> > Yes, this one works.
> 
> Interesting, something about passing a dummy tty
> structure to the ftdi device specific open causes a lock up.
> 
> I don't see an obvious problem.
> 
> With the dummy tty, ftdi_set_termios is called twice
> (once in ftdi_open and once from usb_console_setup)
> in close proximity, maybe that is a problem. If it
> is, that would seem to be another bug someplace.
> 
> What happens if you modify usb/serial/console.c:usb_console_setup
> to call serial->type->set_termios(port, NULL) twice in a row?
> (while still using the latest patch)

Good guess. It hangs then.

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:

usb 3-1: new full speed USB device using ohci_hcd and address 2
ftdi_sio 3-1:1.0: FTDI USB Serial Device converter detected
drivers/usb/serial/ftdi_sio.c: Detected FT232BM
usb 3-1: FTDI USB Serial Device converter now attached to ttyUSB0
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
 [c01790e4] usb_serial_probe+0xf24/0x110c
 [c015af8c] usb_probe_interface+0x78/0xb4
 [c0133d44] driver_probe_device+0x50/0xf4
 [c0133494] bus_for_each_drv+0x5c/0xa4
 [c0133e84] device_attach+0x98/0xb0
 [c0133514] bus_add_device+0x38/0x148
 [c0132070] device_add+0xfc/0x15c
 [c01646dc] usb_set_configuration+0x31c/0x404
 [c015dea4] usb_new_device+0x104/0x200
 [c015fa60] hub_thread+0x878/0xd08
 [c00301e0] kthread+0xf4/0x130
 [c0006a54] kernel_thread+0x44/0x60

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

repeated endlessly and the system hangs.

Thanks
Guennadi
---
Guennadi Liakhovetski


-------------------------------------------------------
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

Reply via email to