From: Randall Nortman Date: Sat, 15 Oct 2005 00:21:50 +0000 (-0700) Subject: [PATCH] usbserial: Regression in USB generic serial driver X-Git-Tag: v2.6.14-rc5~42 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;ds=sidebyside;h=7a3ca7d2b5ec31b2cfa594b961d77e68075e33c7;p=linux-2.6 [PATCH] usbserial: Regression in USB generic serial driver 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 Signed-off-by: Greg Kroah-Hartman Signed-off-by: Linus Torvalds --- diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c index ddde5fb13f..5f7d3193d3 100644 --- a/drivers/usb/serial/generic.c +++ b/drivers/usb/serial/generic.c @@ -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; }