]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb: dwc3: fix fault at system suspend if device was already runtime suspended
authorRoger Quadros <rogerq@kernel.org>
Mon, 4 Nov 2024 14:00:11 +0000 (16:00 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 14 Nov 2024 12:13:41 +0000 (13:13 +0100)
commitd9e65d461a9de037e7c9d584776d025cfce6d86d
tree13401d3ba0a015c36f202afb8582d439252c4416
parent63559ba8077cbadae1c92a65b73ea522bf377dd9
usb: dwc3: fix fault at system suspend if device was already runtime suspended

commit 9cfb31e4c89d200d8ab7cb1e0bb9e6e8d621ca0b upstream.

If the device was already runtime suspended then during system suspend
we cannot access the device registers else it will crash.

Also we cannot access any registers after dwc3_core_exit() on some
platforms so move the dwc3_enable_susphy() call to the top.

Cc: stable@vger.kernel.org # v5.15+
Reported-by: William McVicker <willmcvicker@google.com>
Closes: https://lore.kernel.org/all/ZyVfcUuPq56R2m1Y@google.com
Fixes: 705e3ce37bcc ("usb: dwc3: core: Fix system suspend on TI AM62 platforms")
Signed-off-by: Roger Quadros <rogerq@kernel.org>
Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Tested-by: Will McVicker <willmcvicker@google.com>
Link: https://lore.kernel.org/r/20241104-am62-lpm-usb-fix-v1-1-e93df73a4f0d@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc3/core.c