linux/drivers/usb/core
Alan Stern 4fe0387afa USB: don't send Set-Interface after reset
This patch (as1221) changes the way usbcore reinitializes a device
following a reset or a reset-resume.  Currently we call
usb_set_interface() for every interface in the active configuration;
this is to put the interface into the same altsetting as before the
reset and to make sure that the host's endpoint state matches the
device's endpoint state.

However, sending a Set-Interface request is a waste of time if an
interface was already in altsetting 0 before the reset, since it is
certainly in altsetting 0 afterward.  In addition, many devices can't
handle Set-Interface requests -- they crash when they receive them.

So instead, the patch adds code to check each interface.  If the
interface wasn't in altsetting 0 before the reset, we go head with the
Set-Interface request as before.  But if it was then we skip sending
the Set-Interface request, and we clear out the host-side endpoint
state by calling usb_disable_interface() followed by
usb_enable_interface().

The patch also adds a couple of new comments to explain what's going
on.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-03-24 16:20:38 -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: drivers: use USB API functions rather than constants 2009-03-24 16:20:28 -07:00
devio.c USB: allow libusb to talk to unauthenticated WUSB devices 2009-03-24 16:20:35 -07:00
driver.c USB: fix toggle mismatch in disable_endpoint paths 2009-01-27 16:15:32 -08:00
endpoint.c USB: drivers: use USB API functions rather than constants 2009-03-24 16:20:28 -07: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/PCI: Fix resume breakage of controllers behind cardbus bridges 2009-02-17 16:56:31 -08:00
hcd.c USB: replace uses of __constant_{endian} 2009-03-24 16:20:33 -07:00
hcd.h USB/PCI: Fix resume breakage of controllers behind cardbus bridges 2009-02-17 16:56:31 -08:00
hub.c USB: don't send Set-Interface after reset 2009-03-24 16:20:38 -07:00
hub.h wusb: make ep0_reinit available for modules 2008-04-24 21:16:59 -07:00
inode.c USB: fix char-device disconnect handling 2009-01-27 16:15:32 -08:00
Kconfig usb core: fix USB_OTG_BLACKLIST_HUB typo 2008-10-17 14:40:54 -07:00
Makefile
message.c USB: add quirk to avoid config and interface strings 2009-03-24 16:20:25 -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 USB: add quirk to avoid config and interface strings 2009-03-24 16:20:25 -07:00
sysfs.c USB: add quirk to avoid config and interface strings 2009-03-24 16:20:25 -07:00
urb.c USB: allow libusb to talk to unauthenticated WUSB devices 2009-03-24 16:20:35 -07:00
usb.c USB: re-enable interface after driver unbinds 2009-01-07 10:00:13 -08:00
usb.h USB: fix char-device disconnect handling 2009-01-27 16:15:32 -08:00