xhci: If no endpoints changed, don't issue BW command.
commit567c6a1ce9d9417c33176bb848a6287f5bae6dd4
authorSarah Sharp <sarah.a.sharp@linux.intel.com>
Fri, 2 Sep 2011 18:05:40 +0000 (2 11:05 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 11 Nov 2011 17:36:44 +0000 (11 09:36 -0800)
treeda6a6143cf2342cc34b926d45aaaad76654df4d0
parent6eb006c6079fd54a260caf7dfb3c750f65f4b1fc
xhci: If no endpoints changed, don't issue BW command.

commit 2dc3753997f3c80ce8b950242ab9bb3fb936acfd upstream.

Some alternate interface settings have no endpoints associated with them.
This shows up in some USB webcams, particularly the Logitech HD 1080p,
which uses the uvcvideo driver.  If a driver switches between two alt
settings with no endpoints, there is no need to issue a configure endpoint
command, because there is no endpoint information to update.

The only time a configure endpoint command with just the add slot flag set
makes sense is when the driver is updating hub characteristics in the slot
context.  However, that code never calls xhci_check_bandwidth, so we
should be safe not issuing a command if only the slot context add flag is
set.

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/xhci.c