]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb: dwc3: Set SUSPENDENABLE soon after phy init
authorThinh Nguyen <Thinh.Nguyen@synopsys.com>
Thu, 30 Jan 2025 23:49:31 +0000 (23:49 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 13 Mar 2025 11:51:08 +0000 (12:51 +0100)
commit78669d6f45a5ab5db8ba2de8de3f23f38d966c17
tree6a30f2c2e7e898e82b47df94073104c6ffd7b5e6
parentbf4409f84023b52b5e9b36c0a071a121eee42138
usb: dwc3: Set SUSPENDENABLE soon after phy init

commit cc5bfc4e16fc1d1c520cd7bb28646e82b6e69217 upstream.

After phy initialization, some phy operations can only be executed while
in lower P states. Ensure GUSB3PIPECTL.SUSPENDENABLE and
GUSB2PHYCFG.SUSPHY are set soon after initialization to avoid blocking
phy ops.

Previously the SUSPENDENABLE bits are only set after the controller
initialization, which may not happen right away if there's no gadget
driver or xhci driver bound. Revise this to clear SUSPENDENABLE bits
only when there's mode switching (change in GCTL.PRTCAPDIR).

Fixes: 6d735722063a ("usb: dwc3: core: Prevent phy suspend during init")
Cc: stable <stable@kernel.org>
Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/633aef0afee7d56d2316f7cc3e1b2a6d518a8cc9.1738280911.git.Thinh.Nguyen@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc3/core.c
drivers/usb/dwc3/core.h
drivers/usb/dwc3/drd.c