]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
usb: dwc3: core: Power-off core/PHYs on system_suspend in host mode
authorManu Gautam <mgautam@codeaurora.org>
Thu, 18 Jan 2018 11:24:30 +0000 (16:54 +0530)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Wed, 21 Mar 2018 16:40:41 +0000 (13:40 -0300)
commit04c51994c0b7947b31df1a09dddf58148be04119
tree4076014496ed10c8de7a2f2177dce85678ca56f8
parent8b074f6a724e4fc8f08ab135b57bda9478bcdc9f
usb: dwc3: core: Power-off core/PHYs on system_suspend in host mode

BugLink: http://bugs.launchpad.net/bugs/1757465
commit c4a5153e87fdf6805f63ff57556260e2554155a5 upstream.

Commit 689bf72c6e0d ("usb: dwc3: Don't reinitialize core during
host bus-suspend/resume") updated suspend/resume routines to not
power_off and reinit PHYs/core for host mode.
It broke platforms that rely on DWC3 core to power_off PHYs to
enter low power state on system suspend.

Perform dwc3_core_exit/init only during host mode system_suspend/
resume to addresses power regression from above mentioned patch
and also allow USB session to stay connected across
runtime_suspend/resume in host mode. While at it also replace
existing checks for HOST only dr_mode with current_dr_role to
have similar core driver behavior for both Host-only and DRD+Host
configurations.

Fixes: 689bf72c6e0d ("usb: dwc3: Don't reinitialize core during host bus-suspend/resume")
Reviewed-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
drivers/usb/dwc3/core.c