UPSTREAM: usb: Using correct way to clear usb3.0 device's remote wakeup feature.
authorLan Tianyu <tianyu.lan@intel.com>
Thu, 24 Jan 2013 02:31:28 +0000 (10:31 +0800)
committerChromeBot <chrome-bot@google.com>
Fri, 22 Mar 2013 01:02:53 +0000 (18:02 -0700)
commit99c486b8ff0ebaa2aee3a875d675bc8fc2780c10
tree2781022988e4fc593020cbec9cdfbb0a0d6a5d41
parent785bf06f5f96d7f6fef5205c0cd8e54f2714d6d9
UPSTREAM: usb: Using correct way to clear usb3.0 device's remote wakeup feature.

commit 54a3ac0c9e5b7213daa358ce74d154352657353a upstream.

Usb3.0 device defines function remote wakeup which is only for interface
recipient rather than device recipient. This is different with usb2.0 device's
remote wakeup feature which is defined for device recipient. According usb3.0
spec 9.4.5, the function remote wakeup can be modified by the SetFeature()
requests using the FUNCTION_SUSPEND feature selector. This patch is to use
correct way to disable usb3.0 device's function remote wakeup after suspend
error and resuming.

This should be backported to kernels as old as 3.4, that contain the
commit 623bef9e03a60adc623b09673297ca7a1cdfb367 "USB/xhci: Enable remote
wakeup for USB3 devices."

Signed-off-by: Lan Tianyu <tianyu.lan@intel.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 7ad8ac9444d54af92c61c2fa7d02cbf96c990bc5)

BUG=None
TEST=Together with other cherry-picks: run BVT trybots on all platforms,
manually confirm that USB network/storage/input devices still work
(including across suspend/resume)

Change-Id: Ie97c1e706ee05560b9f8d9db4100c190951d6983
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/46076
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
drivers/usb/core/hub.c
include/linux/usb/ch9.h