usb: dwc2: Prevent core suspend when port connection flag is 0
authorArtur Petrosyan <Arthur.Petrosyan@synopsys.com>
Fri, 26 Mar 2021 10:25:09 +0000 (14:25 +0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Mar 2021 13:51:34 +0000 (14:51 +0100)
commit93f672804bf2d7a49ef3fd96827ea6290ca1841e
treed182c0ae7e998095c428e57af282e7210c09a51a
parent5e3bbae8ee3d677a0aa2919dc62b5c60ea01ba61
usb: dwc2: Prevent core suspend when port connection flag is 0

In host mode port connection status flag is "0" when loading
the driver. After loading the driver system asserts suspend
which is handled by "_dwc2_hcd_suspend()" function. Before
the system suspend the port connection status is "0". As
result need to check the "port_connect_status" if it is "0",
then skipping entering to suspend.

Cc: <stable@vger.kernel.org> # 5.2
Fixes: 6f6d70597c15 ("usb: dwc2: bus suspend/resume for hosts with DWC2_POWER_DOWN_PARAM_NONE")
Signed-off-by: Artur Petrosyan <Arthur.Petrosyan@synopsys.com>
Link: https://lore.kernel.org/r/20210326102510.BDEDEA005D@mailhost.synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc2/hcd.c