linux-sg2042/drivers/usb/class
Johan Hovold cb25505fc6 USB: cdc-acm: fix device unregistration
Unregister tty device in disconnect as is required by the USB stack.

By deferring unregistration to when the last tty reference is dropped,
the parent interface device can get unregistered before the child
resulting in broken hotplug events being generated when the tty is
finally closed:

KERNEL[2290.798128] remove   /devices/pci0000:00/0000:00:1d.7/usb2/2-1/2-1:3.1 (usb)
KERNEL[2290.804589] remove   /devices/pci0000:00/0000:00:1d.7/usb2/2-1 (usb)
KERNEL[2294.554799] remove   /2-1:3.1/tty/ttyACM0 (tty)

The driver must deal with tty callbacks after disconnect by checking the
disconnected flag. Specifically, further opens must be prevented and
this is already implemented.

Cc: stable <stable@vger.kernel.org>
Cc: Oliver Neukum <oneukum@suse.de>
Acked-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-21 15:59:01 -07:00
..
Kconfig tty: Added a CONFIG_TTY option to allow removal of TTY 2013-01-18 16:15:27 -08:00
Makefile USB: add USB test and measurement class driver 2008-10-17 14:40:51 -07:00
cdc-acm.c USB: cdc-acm: fix device unregistration 2013-03-21 15:59:01 -07:00
cdc-acm.h USB: cdc-acm: Fix potential deadlock (lockdep warning) 2011-12-09 16:18:18 -08:00
cdc-wdm.c USB: cdc-wdm: fix buffer overflow 2013-03-12 16:33:05 -07:00
usblp.c USB: usblp.c: remove dbg() usage 2012-05-01 21:33:31 -07:00
usbtmc.c USB: convert drivers/usb/* to use module_usb_driver() 2011-11-18 09:34:02 -08:00