From: Cunhao Lu <1579567540@qq.com> hcd_bus_resume() resumes the root-hub PHYs only for non-automatic PM events, but its failure path suspends them unconditionally. A failed autoresume therefore drops PHY power references without a matching acquisition. If wakeup is disabled for the controller, it can also drop PHY initialization references. Subsequent cleanup can then report unbalanced regulator disables. Guard the failure-path PHY suspend with !PMSG_IS_AUTO(msg), matching the condition used for PHY resume. Fixes: 178a0bce05cb ("usb: core: hcd: integrate the PHY wrapper into the HCD core") Cc: stable@vger.kernel.org Signed-off-by: Cunhao Lu <1579567540@qq.com> --- This USB core issue was found during the RK3572 mainlining work. hcd_bus_resume() resumes the root-hub PHYs only for system PM, but its failure path suspends them even for an automatic resume. This releases PHY power references without a matching acquisition and, depending on the wakeup policy, can also drop initialization references. Subsequent cleanup can then produce unbalanced regulator-disable warnings. This patch guards the failure-path PHY suspend with the same !PMSG_IS_AUTO(msg) condition as the PHY resume. This preserves the PHY references when an automatic resume fails and retains the existing system-PM rollback. Validation: - Hardware testing on the Forlinx OK3572-C reproduced native xHCI Run/Stop timeouts in two USB2-only configurations. With the fix, eleven failed automatic resumes returned -ESHUTDOWN. Tracing showed unchanged PHY initialization and power counts across each call, no extra PHY suspend, power-off or exit calls, and no regulator warnings. No trace events were lost or probes missed. --- drivers/usb/core/hcd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index 8e8a5f59b319b..fc4c28b7d4398 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c @@ -2368,7 +2368,9 @@ int hcd_bus_resume(struct usb_device *rhdev, pm_message_t msg) } } else { hcd->state = old_state; - usb_phy_roothub_suspend(hcd->self.sysdev, hcd->phy_roothub); + if (!PMSG_IS_AUTO(msg)) + usb_phy_roothub_suspend(hcd->self.sysdev, + hcd->phy_roothub); dev_dbg(&rhdev->dev, "bus %s fail, err %d\n", "resume", status); if (status != -ESHUTDOWN) --- base-commit: a804c5742bff224d4cb4d25dd383554d598be32b change-id: 20261106-fix-usb-hcd-autoresume-phy-rollback-e9e7e2b53667 Best regards, -- Cunhao Lu <1579567540@qq.com>