]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[PATCH] USB: pl2303 driver, makes pl2303HX chip work correctly
authorDariusz M <D.Marcinkiewicz@elka.pw.edu.pl>
Thu, 28 Jul 2005 16:06:13 +0000 (18:06 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 8 Sep 2005 23:22:28 +0000 (16:22 -0700)
This trivial patch makes pl2303 driver work correctly with pl2303HX chip.
Apparently some bug in HX version of pl2303 makes the chip loose some
transmitted bytes or stop working at all after reception of
USB_REQ_CLEAR_FEATURE mesage. Logs generated by UsbSnoop application reveal
that windows driver does not send this type of messages to the converter.

From: "Dariusz M." <D.Marcinkiewicz@elka.pw.edu.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/serial/pl2303.c

index 7eab5d4cf3a8c674a84ebafd73c8e4aaa4e2da27..461474176cfbc8aae66081e1dc1c3b3117c83c37 100644 (file)
@@ -538,8 +538,10 @@ static int pl2303_open (struct usb_serial_port *port, struct file *filp)
 
        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);
+       if (priv->type != HX) {
+               usb_clear_halt(serial->dev, port->write_urb->pipe);
+               usb_clear_halt(serial->dev, port->read_urb->pipe);
+       }
 
        buf = kmalloc(10, GFP_KERNEL);
        if (buf==NULL)