On Thu, Jun 05, 2003 at 08:59:25PM -0400, Pete Zaitcev wrote: > > It looks pretty clear. > > 1. The usbserial sets tty->low_latency by default. > Thus, tty_flip_buffer_push falls through to flush_to_ldisc. > > 2. Likely, he PDA continuously sends crap, so when app opens a port (kudzu?), > a cooked port gets connected to PDA; then the line discipline echoes. > > 3. The usbserial assumes that its ->serial_write method is only called > from actual writes from a process, and so downs a semaphore. > In this case, line discipline echo routine writes and not a process.
Ugh, yeah, this is a real problem. > Removing any single condition will fix the problem, but which one? > Killing kudzu from a boot sequence is an option, of course... > But would like a more robust solution. The best would be to > redo locking in the usbserial and use spinlocks as appropriate. > This seems too involved, however. Locking was redone in 2.5 for this very problem (and others that are finally all gone...I hope...) > Apparently, it wasn't a problem in 2.4.18. We shipped a 2.4.20 > based errata and it started complaints. I think when we moved semaphores > from usbserial subcomponents into usbserial.c, a semaphore in > write method was added, even though it was not present in > component drivers in 2.4.18. Greg, why was it added? A real > oops, or just for any case? 2.4.19 -> 2.4.20 had the locking changed again in the usb-serial core to fix up a number of problems the Palm people were having with races on disconnect() and close(). Their problems are now gone, to be replaced with messes like this, and other people's problems... Anyway, the proper thing to to is backport the locking and lifetime rules from 2.5 to 2.4. I was going to try to do that for 2.4.22 if I get the chance. But would gladly take patches from anyone else who wants to do it :) Sorry I don't have a simple fix for you. greg k-h ------------------------------------------------------- This SF.net email is sponsored by: Etnus, makers of TotalView, The best thread debugger on the planet. Designed with thread debugging features you've never dreamed of, try TotalView 6 free at www.etnus.com. _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel