linux-stable/drivers/usb/core
Alan Stern 2caf7fcdb8 USB: re-enable interface after driver unbinds
This patch (as1197) fixes an error introduced recently.  Since a
significant number of devices can't handle Set-Interface requests, we
no longer call usb_set_interface() when a driver unbinds from an
interface, provided the interface is already in altsetting 0.  However
the interface still does get disabled, and the call to
usb_set_interface() was the only thing re-enabling it.  Since the
interface doesn't get re-enabled, further attempts to use it fail.

So the patch adds a call to usb_enable_interface() when a driver
unbinds and the interface is in altsetting 0.  For this to work
right, the interface's endpoints have to be re-enabled but their
toggles have to be left alone.  Therefore an additional argument is
added to usb_enable_endpoint() and usb_enable_interface(), a flag
indicating whether or not the endpoint toggles should be reset.

This is a forward-ported version of a patch which fixes Bugzilla
#12301.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Reported-by: David Roka <roka@dawid.hu>
Reported-by: Erik Ekman <erik@kryo.se>
Tested-by: Erik Ekman <erik@kryo.se>
Tested-by: Alon Bar-Lev <alon.barlev@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-07 10:00:13 -08: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: hub: add check for unsupported bus topology 2008-07-21 15:16:26 -07:00
devio.c USB: Remove restrictions on signal numbers in devio.c 2009-01-07 09:59:51 -08:00
driver.c USB: re-enable interface after driver unbinds 2009-01-07 10:00:13 -08:00
endpoint.c USB: utilize the bus notifiers 2009-01-07 10:00:08 -08:00
file.c USB: remove err() macro from usb core code 2008-10-17 14:41:11 -07:00
generic.c USB: Enhance usage of pm_message_t 2009-01-07 10:00:03 -08:00
hcd-pci.c USB: automatically enable wakeup for PCI host controllers 2009-01-07 10:00:12 -08:00
hcd.c USB: mark "reject" field of struct urb as atomic_t 2009-01-07 10:00:08 -08:00
hcd.h USB: fix up suspend and resume for PCI host controllers 2009-01-07 10:00:12 -08:00
hub.c USB: re-enable interface after driver unbinds 2009-01-07 10:00:13 -08:00
hub.h wusb: make ep0_reinit available for modules 2008-04-24 21:16:59 -07:00
inode.c zero i_uid/i_gid on inode allocation 2009-01-05 11:54:28 -05:00
Kconfig usb core: fix USB_OTG_BLACKLIST_HUB typo 2008-10-17 14:40:54 -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: re-enable interface after driver unbinds 2009-01-07 10:00:13 -08: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: utilize the bus notifiers 2009-01-07 10:00:08 -08:00
urb.c USB: extension of anchor API to unpoison an anchor 2009-01-07 10:00:11 -08:00
usb.c USB: re-enable interface after driver unbinds 2009-01-07 10:00:13 -08:00
usb.h USB: re-enable interface after driver unbinds 2009-01-07 10:00:13 -08:00