]> git.baikalelectronics.ru Git - kernel.git/commit
usbcore: enable USB2 LPM if port suspend fails
authorAndiry Xu <andiry.xu@gmail.com>
Fri, 4 May 2012 16:50:10 +0000 (00:50 +0800)
committerSarah Sharp <sarah.a.sharp@linux.intel.com>
Thu, 17 May 2012 17:36:57 +0000 (10:36 -0700)
commitd2fb8ed5202bdb34c6803e55a606384102e2e39a
tree93fbd40123a934b70371932c2d5e9e3773f42eef
parent4daa8de002abc785b21124addde56c993e288dc5
usbcore: enable USB2 LPM if port suspend fails

USB2 LPM is disabled when device begin to suspend and enabled after device
is resumed. That's because USB spec does not define the transition from
U1/U2 state to U3 state.

If usb_port_suspend() fails, usb_port_resume() is never called, and USB2 LPM
is disabled in this situation. Enable USB2 LPM if port suspend fails.

This patch should be backported to kernels as old as 3.2, that contain
the commit 5d29496d00640119a33bfef8351bc9db2444403a "xHCI: set USB2
hardware LPM".

Signed-off-by: Andiry Xu <andiry.xu@gmail.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@vger.kernel.org
drivers/usb/core/hub.c