android_kernel_xiaomi_sdm845/drivers/usb/core
Alan Stern 9da82bd464 USB: implement "soft" unbinding
This patch (as1091) changes the way usbcore handles interface
unbinding.  If the interface's driver supports "soft" unbinding (a new
flag in the driver structure) then in-flight URBs are not cancelled
and endpoints are not disabled.  Instead the driver is allowed to
continue communicating with the device (although of course it should
stop before its disconnect routine returns).

The purpose of this change is to allow drivers to do a clean shutdown
when they get unbound from a device that is still plugged in.  Killing
all the URBs and disabling the endpoints before calling the driver's
disconnect method doesn't give the driver any control over what
happens, and it can leave devices in indeterminate states.  For
example, when usb-storage unbinds it doesn't want to stop while in the
middle of transmitting a SCSI command.

The soft_unbind flag is added because in the past, a number of drivers
have experienced problems related to ongoing I/O after their disconnect
routine returned.  Hence "soft" unbinding is made available only to
drivers that claim to support it.

The patch also replaces "interface_to_usbdev(intf)" with "udev" in a
couple of places, a minor simplification.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21 15:15:54 -07:00
..
buffer.c USB: fix codingstyle issues in drivers/usb/core/*.c 2008-02-01 14:35:08 -08:00
config.c USB: ehci tolerates some buggy devices 2008-04-24 21:16:35 -07:00
devices.c USB: fix codingstyle issues in drivers/usb/core/devices.c 2008-02-01 14:35:07 -08:00
devio.c usbdev: BKL pushdown 2008-06-20 14:05:53 -06:00
driver.c USB: implement "soft" unbinding 2008-07-21 15:15:54 -07:00
endpoint.c USB: usb dev_set_name() instead of dev->bus_id 2008-07-21 15:15:47 -07:00
file.c USB: usb dev_name() instead of dev->bus_id 2008-07-21 15:15:46 -07:00
generic.c USB: fix possible deadlock involving sysfs attributes 2008-05-29 13:59:03 -07:00
hcd-pci.c USB: clarify usage of hcd->suspend/resume methods 2008-04-24 21:16:48 -07:00
hcd.c USB: usb dev_name() instead of dev->bus_id 2008-07-21 15:15:46 -07:00
hcd.h USB: handle pci_name() being const 2008-07-21 15:15:46 -07:00
hub.c USB: combine hub_quiesce and hub_stop 2008-07-21 15:15:52 -07:00
hub.h wusb: make ep0_reinit available for modules 2008-04-24 21:16:59 -07:00
inode.c proc: remove proc_bus 2008-04-29 08:06:18 -07:00
Kconfig USB: Remove EXPERIMENTAL from dynamic USB minor allocation. 2008-04-24 21:16:43 -07:00
Makefile USB: add a blacklist for devices that can't handle some things we throw at them. 2007-02-23 15:03:46 -08:00
message.c USB: usb dev_set_name() instead of dev->bus_id 2008-07-21 15:15:47 -07:00
notify.c USB : correct comments in usb/core/notify.c 2008-02-01 14:34:44 -08:00
otg_whitelist.h USB: fix codingstyle issues in drivers/usb/core/*.h 2008-02-01 14:35:07 -08:00
quirks.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2008-06-17 18:10:40 -07:00
sysfs.c USB: add all configs to the "descriptors" attribute 2008-05-29 13:59:03 -07:00
urb.c USB: replace remaining __FUNCTION__ occurrences 2008-04-24 21:16:55 -07:00
usb.c USB: usb dev_set_name() instead of dev->bus_id 2008-07-21 15:15:47 -07:00
usb.h USB: create attributes before sending uevent 2008-05-14 10:00:26 -07:00