Commit ec58f8e3 authored by Neil Turton's avatar Neil Turton Committed by Greg Kroah-Hartman

[PATCH] USB Serial patch for old pl2303 devices.

I got a PL2303 USB serial converter a few days ago, and got your driver
up and running fairly quickly.  The problem is that I got an oops when I
rmmod-ed the drivers.  The pl2303 uses two interfaces but registers only
the second (technically wrong, I guess, but should work).  When pl2303.o
is removed, it attempts to deregister the first interface (which has no
effect), so the second interface remains registered with usbserial.  The
old struct serial still points at the removed pl2303 driver so things go
pop when anything touches it.

I think the PL2303 hack in usb_serial_probe should not change the
"interface" variable, which gets stored in serial->interface, since
usbcore will register whatever "ifnum" says.  I think that's enough
waffle.  The patch is below.  Keep up the good work!
parent 9a1a4649
......@@ -960,9 +960,7 @@ int usb_serial_probe(struct usb_interface *interface,
(dev->descriptor.idProduct == ATEN_PRODUCT_ID))) {
if (interface != &dev->actconfig->interface[0]) {
/* check out the endpoints of the other interface*/
//interface = &dev->actconfig->interface[ifnum ^ 1];
interface = &dev->actconfig->interface[0];
iface_desc = &interface->altsetting[0];
iface_desc = &dev->actconfig->interface[0].altsetting[0];
for (i = 0; i < iface_desc->desc.bNumEndpoints; ++i) {
endpoint = &iface_desc->endpoint[i].desc;
if ((endpoint->bEndpointAddress & 0x80) &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment