Commit 75c715cd authored by Roy Luo's avatar Roy Luo
Browse files

UPSTREAM: usb: dwc3: re-enable runtime PM after failed resume



When dwc3_resume_common() returns an error, runtime pm is left in
suspended and disabled state in dwc3_resume(). Since the device
is suspended, its parent devices (like the power domain or glue
driver) could also be suspended and may have released resources
that dwc requires. Consequently, calling dwc3_suspend_common() in
this situation could result in attempts to access unclocked or
unpowered registers.
To prevent these problems, runtime PM should always be re-enabled,
even after failed resume attempts. This ensures that
dwc3_suspend_common() is skipped in such cases.

Fixes: 68c26fe5 ("usb: dwc3: set pm runtime active before resume common")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarRoy Luo <royluo@google.com>
Acked-by: default avatarThinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/20240913232145.3507723-1-royluo@google.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 364713520
Test: suspend without crash after a failed resume
Change-Id: I76b2727b82dc953a2e04a00ea0c8027ee5c9f9d9
(cherry picked from commit 897e13a8)
Signed-off-by: default avatarRoy Luo <royluo@google.com>
parent 0f227407
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment