Re: usbserial not working/oops on removal

From: Oliver Neukum
Date: Sat Mar 03 2007 - 10:33:38 EST


Am Samstag, 3. MÃrz 2007 14:27 schrieb Andreas Laumann:
> Unfortunately your fix Âdoes not work. ÂThe first one seems registered
> correctly, but after that it fails again for the next one.

Please try this additional patch on top of the first.

Regards
Oliver

--- a/drivers/usb/serial/usb-serial.c 2007-03-03 16:28:22.000000000 +0100
+++ b/drivers/usb/serial/usb-serial.c 2007-03-03 16:28:26.000000000 +0100
@@ -847,7 +847,6 @@
port = kzalloc(sizeof(struct usb_serial_port), GFP_KERNEL);
if (!port)
goto probe_error;
- port->number = i + serial->minor;
port->serial = serial;
spin_lock_init(&port->lock);
mutex_init(&port->mutex);
@@ -982,6 +981,9 @@
}
serial->minor = minor;

+ for (i = 0; i < max_endpoints; ++i)
+ serial->port[i]->number = i + serial->minor;
+
/* register all of the individual ports with the driver core */
for (i = 0; i < num_ports; ++i) {
port = serial->port[i];
-
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/