android_kernel_samsung_msm8976/drivers/usb/core
Sarah Sharp 3f0479e00a USB: Check bandwidth when switching alt settings.
Make the USB core check the bandwidth when switching from one
interface alternate setting to another.  Also check the bandwidth
when resetting a configuration (so that alt setting 0 is used).  If
this check fails, the device's state is unchanged.  If the device
refuses the new alt setting, re-instate the old alt setting in the
host controller hardware.

If a USB device doesn't have an alternate interface setting 0, install
the first alt setting in its descriptors when a new configuration is
requested, or the device is reset.

Add a mutex per root hub to protect bandwidth operations:
adding/reseting/changing configurations, and changing alternate interface
settings.  We want to ensure that the xHCI host controller and the USB
device are set up for the same configurations and alternate settings.
There are two (possibly three) steps to do this:

 1. The host controller needs to check that bandwidth is available for a
    different setting, by issuing and waiting for a configure endpoint
    command.
 2. Once that returns successfully, a control message is sent to the
    device.
 3. If that fails, the host controller must be notified through another
    configure endpoint command.

The mutex is used to make these three operations seem atomic, to prevent
another driver from using more bandwidth for a different device while
we're in the middle of these operations.

While we're touching the bandwidth code, rename usb_hcd_check_bandwidth()
to usb_hcd_alloc_bandwidth().  This function does more than just check
that the bandwidth change won't exceed the bus bandwidth; it actually
changes the bandwidth configuration in the xHCI host controller.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-12-11 11:55:27 -08:00
..
buffer.c USB: pass mem_flags to dma_alloc_coherent 2009-04-23 14:15:28 -07:00
config.c USB: Fix SS endpoint companion descriptor parsing. 2009-09-23 06:46:18 -07:00
devices.c USB: add missing class descriptions used in usb/devices file 2009-07-12 15:16:39 -07:00
devio.c USB: usbfs: add USBDEVFS_URB_BULK_CONTINUATION flag 2009-09-23 06:46:39 -07:00
driver.c USB: add remove_id sysfs attr for usb drivers 2009-12-11 11:55:26 -08:00
endpoint.c driver model: constify attribute groups 2009-09-15 09:50:47 -07:00
file.c USB: fix possible null deref in init_usb_class() 2009-12-11 11:55:22 -08:00
generic.c USB: Convert a dev_info to a dev_dbg 2009-12-11 11:55:13 -08:00
hcd-pci.c USB: new flag for resume-from-hibernation 2009-06-15 21:44:44 -07:00
hcd.c USB: Check bandwidth when switching alt settings. 2009-12-11 11:55:27 -08:00
hcd.h USB: Check bandwidth when switching alt settings. 2009-12-11 11:55:27 -08:00
hub.c USB: Check bandwidth when switching alt settings. 2009-12-11 11:55:27 -08:00
hub.h USB: fix the clear_tt_buffer interface 2009-07-12 15:16:38 -07:00
inode.c const: mark remaining super_operations const 2009-09-22 07:17:24 -07:00
Kconfig Revert USB: usbfs: deprecate and hide option for !embedded 2009-07-12 15:16:39 -07:00
Makefile USB: add the usbfs devices file to debugfs 2009-06-15 21:44:43 -07:00
message.c USB: Check bandwidth when switching alt settings. 2009-12-11 11:55:27 -08:00
notify.c
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: prepare for changover to Runtime PM framework 2009-12-11 11:55:25 -08:00
urb.c USB: allow interrupt transfers to WUSB devices 2009-12-11 11:55:14 -08:00
usb.c USB: Refactor code to find alternate interface settings. 2009-12-11 11:55:27 -08:00
usb.h USB: add a "remove hardware" sysfs attribute 2009-12-11 11:55:18 -08:00