On Mon, Mar 12, 2007 at 04:22:22PM -0400, Mark Lord wrote:
quoted text > Oliver Neukum wrote:
> >>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!
> ..
> >IMHO shutdown() is using serial->port[] and bombs.
> >Could you reverse the order here?
>
> Yup. Fixed. Tested. Works.
>
> This patch fixes the Oops that otherwise occurs whenever
> a USB serial adapter is unplugged from a system, as well
> the Oops seen when one is in use before resume (to RAM).
>
> GregKH: This needs to go into 2.6.21-rc*.
>
> Signed-off-by: Mark Lord <mlord@pobox.com>
> ---
> --- 2.6.21-rc3/drivers/usb/serial/usb-serial.c 2007-03-12
> 11:22:43.000000000 -0400
> +++ linux/drivers/usb/serial/usb-serial.c 2007-03-12
> 16:12:53.000000000 -0400
> @@ -141,6 +141,9 @@
> for (i = 0; i < serial->num_ports; ++i)
> serial->port[i]->open_count = 0;
>
> + if (serial->type->shutdown)
> + serial->type->shutdown(serial);
> +
> /* 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) {
> @@ -148,9 +151,6 @@
> serial->port[i] = NULL;
> }
>
> - if (serial->type->shutdown)
> - serial->type->shutdown(serial);
> -
Argh, no, this change was done to help the ftdi drivers out.
Look at changeset d9a7ecacac5f8274d2afce09aadcf37bdb42b93a in Linus's
tree from Jim Radford:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d9a7ecacac...
It makes this change because the usb-serial drivers need the port
devices when the port_remove() callbacks happen. Otherwise you get an
oops that way.
Jim, can you take a look at this and see if you can figure something
out?
thanks,
greg k-h
-
unsubscribe notice To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Messages in current thread:
Re: [PATCH] usb-serial regression (Oops) in 2.6.21-rc* , Greg KH , (Mon Mar 12, 1:33 pm)
Re: BSOD , David Miller , (Mon Mar 19, 12:38 pm)
Re: BSOD , Jesse Barnes , (Mon Mar 19, 12:54 pm)
Re: BSOD , David Miller , (Mon Mar 19, 1:05 pm)
Re: BSOD , Jesse Barnes , (Mon Mar 19, 1:20 pm)
Re: BSOD , Jim Gettys , (Mon Mar 19, 1:20 pm)
Re: BSOD , Paul Mackerras , (Tue Mar 20, 2:19 am)
Re: BSOD , Jim Gettys , (Tue Mar 20, 1:33 pm)