Re: usbserial not working/oops on removal
From: Andreas Laumann
Date: Sat Mar 03 2007 - 15:16:12 EST
Am Samstag, den 03.03.2007, 16:33 +0100 schrieb Oliver Neukum:
> 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];
Now, we're back in business. The combined patches are working with rawhide's
kernel-2.6.20-1.2962.fc7.x86_64 which in fact is 2.6.21rc2-git2
usbcore: registered new interface driver usbserial
drivers/usb/serial/usb-serial.c: USB Serial support registered for generic
usbcore: registered new interface driver usbserial_generic
drivers/usb/serial/usb-serial.c: USB Serial Driver core
drivers/usb/serial/usb-serial.c: USB Serial support registered for Reiner SCT Cyberjack USB card reader
cyberjack 5-2.2:1.0: Reiner SCT Cyberjack USB card reader converter detected
usb 5-2.2: Reiner SCT Cyberjack USB card reader converter now attached to ttyUSB0
cyberjack 5-2.3:1.0: Reiner SCT Cyberjack USB card reader converter detected
usb 5-2.3: Reiner SCT Cyberjack USB card reader converter now attached to ttyUSB1
usbcore: registered new interface driver cyberjack
drivers/usb/serial/cyberjack.c: v1.01 Matthias Bruestle
drivers/usb/serial/cyberjack.c: REINER SCT cyberJack pinpad/e-com USB Chipcard Reader Driver
Good job, Oliver.
Regards
Andreas
--
All that is necessary for the triumph of evil is that good men do
nothing. - Edmund Burke (1729 - 1797)
-
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/