Hallo,

I had 2 problems with
drivers/usb/serial/pl2303.c in Kernel 2.4.23

First, after a frameerror, a parityerror or a overrunerror occur the driver
reports this error for all following bytes recived.
This continues as long no linestatuschange occures.
Result is a zerofilled datastream.

Second, after using CRTSCTS it is not possible to disable flowcontrol.
Only disconnecting the device disables flowcontrol.  

The informations from the prolific website (linuxdriver and "datasheet") dont
clarify the flowcontrol and errorreporting. Where can i get more information
about pl2303 to be sure this (working)patch is ok? 


*** /home/garfield/pl2303.c.23  Thu Dec 11 20:13:21 2003
--- drivers/usb/serial/pl2303.c Thu Dec 18 11:07:32 2003
***************
*** 372,377 ****
--- 372,383 ----
        dbg ("0xa1:0x21:0:0  %d - %x %x %x %x %x %x %x", i,
             buf[0], buf[1], buf[2], buf[3], buf[4], buf[5], buf[6]);
  
+       if (cflag & CLOCAL) {
+               i = usb_control_msg (serial->dev, usb_sndctrlpipe (serial->dev, 0),
+                                    VENDOR_WRITE_REQUEST, VENDOR_WRITE_REQUEST_TYPE,
+                                    0x0, 0x00, NULL, 0, 100);
+               dbg ("0x40:0x1:0x0:0x00  %d", i);
+       }
        if (cflag & CRTSCTS) {
                i = usb_control_msg (serial->dev, usb_sndctrlpipe (serial->dev, 0),
                                     VENDOR_WRITE_REQUEST, VENDOR_WRITE_REQUEST_TYPE,
***************
*** 717,722 ****
--- 723,729 ----
  
        spin_lock_irqsave(&priv->lock, flags);
        status = priv->line_status;
+       priv->line_status&=~(UART_FRAME_ERROR|UART_PARITY_ERROR|UART_OVERRUN_ERROR);
        spin_unlock_irqrestore(&priv->lock, flags);
  
        /* break takes precedence over parity, */


-- 
MFG Gernot
*** /home/garfield/pl2303.c.23	Thu Dec 11 20:13:21 2003
--- drivers/usb/serial/pl2303.c	Thu Dec 18 11:07:32 2003
***************
*** 372,377 ****
--- 372,383 ----
  	dbg ("0xa1:0x21:0:0  %d - %x %x %x %x %x %x %x", i,
  	     buf[0], buf[1], buf[2], buf[3], buf[4], buf[5], buf[6]);
  
+ 	if (cflag & CLOCAL) {
+ 		i = usb_control_msg (serial->dev, usb_sndctrlpipe (serial->dev, 0),
+ 				     VENDOR_WRITE_REQUEST, VENDOR_WRITE_REQUEST_TYPE,
+ 				     0x0, 0x00, NULL, 0, 100);
+ 		dbg ("0x40:0x1:0x0:0x00  %d", i);
+ 	}
  	if (cflag & CRTSCTS) {
  		i = usb_control_msg (serial->dev, usb_sndctrlpipe (serial->dev, 0),
  				     VENDOR_WRITE_REQUEST, VENDOR_WRITE_REQUEST_TYPE,
***************
*** 717,722 ****
--- 723,729 ----
  
  	spin_lock_irqsave(&priv->lock, flags);
  	status = priv->line_status;
+ 	priv->line_status&=~(UART_FRAME_ERROR|UART_PARITY_ERROR|UART_OVERRUN_ERROR);
  	spin_unlock_irqrestore(&priv->lock, flags);
  
  	/* break takes precedence over parity, */

Reply via email to