[PATCH] usbserial: Regression in USB generic serial driver

From: Randall Nortman
Date: Thu Oct 13 2005 - 23:21:42 EST


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@xxxxxxxxxxxxxxx>
---
I'm sending this a second time, after reading up on the right way to
submit a patch (much thanks to Chris Wright). Now we see if I'm
capable of following instructions properly.

diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c
--- a/drivers/usb/serial/generic.c
+++ b/drivers/usb/serial/generic.c
@@ -223,7 +223,7 @@ int usb_serial_generic_write_room (struc
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;
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/