]> git.karo-electronics.de Git - karo-tx-linux.git/commit
USB: Fix LPM disable count mismatch on driver unbind.
authorSarah Sharp <sarah.a.sharp@linux.intel.com>
Thu, 5 Jul 2012 21:09:30 +0000 (14:09 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Aug 2012 15:22:50 +0000 (08:22 -0700)
commit7d9d6c8657eb8542dbe2d22a9135883c0cc4663c
treed616de2295298afb91fc7b9aecc998a3ef798c33
parent92e6be29a445e0a3d2edceea5d2e8659864ed52d
USB: Fix LPM disable count mismatch on driver unbind.

commit 249719121bc2b841bdfcab5eb21b10d8b871743b upstream.

When a user runs `echo 0 > bConfigurationValue` for a USB 3.0 device,
usb_disable_device() is called.  This function disables all drivers,
deallocates interfaces, and sets the device configuration value to 0
(unconfigured).

With the new scheme to ensure that unconfigured devices have LPM
disabled, usb_disable_device() must call usb_unlocked_disable_lpm() once
it unconfigures the device.

This commit should be backported to kernels as old as 3.5, that contain
the commit 8306095fd2c1100e8244c09bf560f97aca5a311d "USB: Disable USB
3.0 LPM in critical sections."

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/message.c