summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2012-11-07 10:31:30 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-11-11 18:06:48 -0800
commit36caff5d795429c572443894e8789c2150dd796b (patch)
treea2079deddd3e5066f22dfc166f297a2da9636432 /drivers/usb/host
parent7fd94beecaff19b346efbf6b77288ab4b0b42dbd (diff)
downloadblackbird-obmc-linux-36caff5d795429c572443894e8789c2150dd796b.tar.gz
blackbird-obmc-linux-36caff5d795429c572443894e8789c2150dd796b.zip
USB: fix endpoint-disabling for failed config changes
This patch (as1631) fixes a bug that shows up when a config change fails for a device under an xHCI controller. The controller needs to be told to disable the endpoints that have been enabled for the new config. The existing code does this, but before storing the information about which endpoints were enabled! As a result, any second attempt to install the new config is doomed to fail because xhci-hcd will refuse to enable an endpoint that is already enabled. The patch optimistically initializes the new endpoints' device structures before asking the device to switch to the new config. If the request fails then the endpoint information is already stored, so we can use usb_hcd_alloc_bandwidth() to disable the endpoints with no trouble. The rest of the error path is slightly more complex now; we have to disable the new interfaces and call put_device() rather than simply deallocating them. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Reported-and-tested-by: Matthias Schniedermeyer <ms@citd.de> CC: Sarah Sharp <sarah.a.sharp@linux.intel.com> CC: <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud