Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit edf356f2 authored by Artur Petrosyan's avatar Artur Petrosyan Committed by Greg Kroah-Hartman
Browse files

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: c5c403dc ("usb: dwc2: Add host/device hibernation functions")
Acked-by: default avatarMinas Harutyunyan <Minas.Harutyunyan@synopsys.com>
Signed-off-by: default avatarArtur Petrosyan <Arthur.Petrosyan@synopsys.com>
Link: https://lore.kernel.org/r/20210416124707.5EEC2A005D@mailhost.synopsys.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent feb4750e
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -5741,7 +5741,15 @@ int dwc2_host_exit_hibernation(struct dwc2_hsotg *hsotg, int rem_wakeup,
		return ret;
	}

	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;