diff options
author | Artur Petrosyan <Arthur.Petrosyan@synopsys.com> | 2021-04-16 16:47:06 +0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-05-14 09:50:21 +0200 |
commit | 7bf9d7286cf26c86f07e01eead54c1faa2fd29aa (patch) | |
tree | 11dc6b03fbd65240c9e7f3fee65fe9e248a8e381 | |
parent | 1789737ca9f1855251d8d2953b03df6f68da45a7 (diff) | |
download | kernel_replicant_linux-7bf9d7286cf26c86f07e01eead54c1faa2fd29aa.tar.gz kernel_replicant_linux-7bf9d7286cf26c86f07e01eead54c1faa2fd29aa.tar.bz2 kernel_replicant_linux-7bf9d7286cf26c86f07e01eead54c1faa2fd29aa.zip |
usb: dwc2: Fix host mode hibernation exit with remote wakeup flow.
[ Upstream commit c2db8d7b9568b10e014af83b3c15e39929e3579e ]
Added setting "port_connect_status_change" flag to "1" in order
to re-enumerate, because after exit from hibernation port
connection status is not detected.
Fixes: c5c403dc4336 ("usb: dwc2: Add host/device hibernation functions")
Acked-by: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
Signed-off-by: Artur Petrosyan <Arthur.Petrosyan@synopsys.com>
Link: https://lore.kernel.org/r/20210416124707.5EEC2A005D@mailhost.synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | drivers/usb/dwc2/hcd.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c index 1a9789ec5847..6af1dcbc3656 100644 --- a/drivers/usb/dwc2/hcd.c +++ b/drivers/usb/dwc2/hcd.c @@ -5580,7 +5580,15 @@ int dwc2_host_exit_hibernation(struct dwc2_hsotg *hsotg, int rem_wakeup, return ret; } - dwc2_hcd_rem_wakeup(hsotg); + if (rem_wakeup) { + dwc2_hcd_rem_wakeup(hsotg); + /* + * Change "port_connect_status_change" flag to re-enumerate, + * because after exit from hibernation port connection status + * is not detected. + */ + hsotg->flags.b.port_connect_status_change = 1; + } hsotg->hibernated = 0; hsotg->bus_suspended = 0; |