usb: core: hub: Enable/disable U1/U2 in configured state
authorThinh Nguyen <Thinh.Nguyen@synopsys.com>
Tue, 14 May 2019 21:38:31 +0000 (14:38 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 21 May 2019 08:25:58 +0000 (10:25 +0200)
commitfea3af5e0358b014c653561109c11ebd3ecdbff2
tree4030893ec3bd74461161941c04774927be5216e2
parentd991f855cb4f84c638e2016818259720ceed4191
usb: core: hub: Enable/disable U1/U2 in configured state

SET_FEATURE(U1/U2_ENABLE) and CLEAR_FEATURE(U1/U2) only apply while the
device is in configured state. Add proper check in usb_disable_lpm() and
usb_enable_lpm() for enabling/disabling device-initiated U1/U2.

Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/hub.c