this patch from greg k-h fixes this problem. thx!
(the patch also works on 2.4.17 ...)

# USB: fix data toggle problem for pl2303 driver.

diff -Nru a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c
--- a/drivers/usb/serial/pl2303.c       Tue Sep  2 16:49:31 2003
+++ b/drivers/usb/serial/pl2303.c       Tue Sep  2 16:49:31 2003
@@ -404,6 +404,9 @@
                
        dbg("%s -  port %d", __FUNCTION__, port->number);
 
+       usb_clear_halt(serial->dev, port->write_urb->pipe);
+       usb_clear_halt(serial->dev, port->read_urb->pipe);
+
 #define FISH(a,b,c,d)                                                          \
        result=usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev,0),     \
                               b, a, c, d, buf, 1, 100);                        \


> On Tue, Aug 26, 2003 at 12:36:00PM +0200, Norbert Federa wrote:
> > hi,
> > 
> > i did again some testing with several pl2303 based adapters
> > under linux-2.6.0-test4. 
> > 
> > the serial apps still have severe problems. 
> > i've done some more testing and it seems that the first
> > byte coming to the pl2303 _never_ arrives in a read() from
> > /dev/ttyUSB0 - except in the _first_ read after reinsertion
> > of the pl2303 based device!
> > 
> > the problem is very easy to reproduce:
> > 
> > just connect a serial cross link cable to /dev/ttyS0 and the
> > other end to /dev/ttyUSB0 (the pl2303) and run the
> > attached debug.c file.
> > 
> > this program expects 2 params: read device and write device
> > eg: ./debug /dev/ttyUSB /dev/ttyS0
> > 
> > a test string ("Hello World") is written to argv[2] and
> > the data read from argv[1] is written to stderr.
> > 
> > 
> > i can reproduce the following on several uhci based boxes:
> 
> I can reproduce this too :(
> 
> Hm, wonder if the same fix I did for the io_ti driver will work here.
> I'll try testing that tomorrow.
> 
> If you want to try it, look at the open() call in the io_ti driver for
> the lines to add to reset the endpoints.
> 
> thanks,
> 
> greg k-h
> 
> 



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to