[PATCH] usbserial: Regression in USB generic serial driver
authorRandall Nortman <linuxkernellist@wonderclown.com>
Sat, 15 Oct 2005 00:21:50 +0000 (17:21 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sat, 15 Oct 2005 01:13:31 +0000 (18:13 -0700)
Kernel version 2.6.13 introduced a regression in the generic USB
serial converter driver (usbserial.o, drivers/usb/serial/generic.c).
The bug manifests, as far as I can tell, whenever you attempt to write
to the device -- the write will never complete (write() returns 0, or
blocks).

Signed-off-by: Randall Nortman <oss@wonderclown.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
drivers/usb/serial/generic.c

index ddde5fb13f6b33a9003cebcd94a118ee1f37d821..5f7d3193d355e7a3cfe3c6408e9fddc36a37d890 100644 (file)
@@ -223,7 +223,7 @@ int usb_serial_generic_write_room (struct usb_serial_port *port)
        dbg("%s - port %d", __FUNCTION__, port->number);
 
        if (serial->num_bulk_out) {
-               if (port->write_urb_busy)
+               if (!(port->write_urb_busy))
                        room = port->bulk_out_size;
        }