]> www.infradead.org Git - users/jedix/linux-maple.git/commit
usb: dwc3: re-enable runtime PM after failed resume
authorRoy Luo <royluo@google.com>
Fri, 13 Sep 2024 23:21:45 +0000 (23:21 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Oct 2024 13:32:39 +0000 (15:32 +0200)
commit897e13a8f9a23576eeacb95075fdded97b197cc3
tree456c6e52743aeff2707000cdf5d58968dbe25e44
parenta6555cb1cb69db479d0760e392c175ba32426842
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: 68c26fe58182 ("usb: dwc3: set pm runtime active before resume common")
Cc: stable@vger.kernel.org
Signed-off-by: Roy Luo <royluo@google.com>
Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/20240913232145.3507723-1-royluo@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc3/core.c