This patch fixes a bug in ftdi_sio.c where the driver wouldn't unlink the read urb if the user application cleared the HUPCL flag on termios->c_cflag.


It applies cleanly against kernel 2.4.26-pre1.

--
Paulo Marques - www.grupopie.com
"In a world without walls and fences who needs windows and gates?"
--- drivers/usb/serial/ftdi_sio.c.orig  2004-03-25 11:54:56.720280032 +0000
+++ drivers/usb/serial/ftdi_sio.c       2004-03-25 11:56:41.632330976 +0000
@@ -1325,15 +1325,16 @@ static void ftdi_close (struct usb_seria
                        /* drop RTS */
                        if (set_rts(port, LOW) < 0) {
                                err("Error from RTS LOW urb");
-                       }       
-                       /* shutdown our bulk read */
-                       if (port->read_urb) {
-                               usb_unlink_urb (port->read_urb);        
                        }
-                       /* unlink the running write urbs */
-                       
-
                } /* Note change no line is hupcl is off */
+
+               /* shutdown our bulk read */
+               if (port->read_urb) {
+                       if(usb_unlink_urb (port->read_urb)<0)
+                               err("Error unlinking urb");
+               }
+               /* unlink the running write urbs */
+
        } /* if (serial->dev) */
 
 

Reply via email to