Re: [BUG} usb-serial regression in 2.6.21-rc2-git3

Oliver Neukum
2007-03-12T18:48:22Z

Am Montag, 12. März 2007 17:50 schrieb Mark Lord:
> Mark Lord wrote:
> >
> > Okay, from that part (above), the problem is obvious:
> > in that the "MCT U232 converter now disconnected" appears,
> > and then we continue to try and call the driver's method.. Oops!
> >
> > The hack patch below "fixes" this, but it really just hides whatever
> > the real problem underneath was:

static void destroy_serial(struct kref *kref):

/* the ports are cleaned up and released in port_release() */
for (i = 0; i < serial->num_ports; ++i)
if (serial->port[i]->dev.parent != NULL) {
device_unregister(&serial->port[i]->dev);
serial->port[i] = NULL;
}

if (serial->type->shutdown)
serial->type->shutdown(serial);

IMHO shutdown() is using serial->port[] and bombs.
Could you reverse the order here?

Regards
Oliver