[PATCH v2 0/3] usb: musb: omap2430: handle PHY setup failures across PM

From: Pengpeng Hou

Date: Mon Sep 21 2026 - 20:44:59 EST


The OMAP2430 glue has three unchecked PHY setup sites: initial setup,
runtime resume and system resume. This v2 resends them as one threaded
series, as Greg requested, and closes the shared reference-ownership gap
before adding the remaining error propagation.

Patch 1 records initialization and power references independently and
uses common helpers in init, PM and exit. Patch 2 stops runtime resume
and mailbox work when resuming fails. Patch 3 reports normal system-resume
failure while ending the temporary I2C/SPI PHY deferral, allowing a later
runtime resume to retry.

The existing phy_suspended flag controls system-sleep ordering, not
resource ownership. Keeping those roles separate avoids double-release
on another suspend or platform exit after a failed resume. A release
failure retains its ownership flag rather than silently discarding it.

The three original setup sites share this lifecycle machinery. They are
not three independent proofs of hardware faults, and this series does
not address errors hidden inside individual PHY providers.

The issues were found by our static-analysis tool.

Changes since v1:
- resend with all three members replying directly to this cover
- share reference tracking across init, runtime PM, system PM and exit
- account for a cleanup operation itself failing
- stop mailbox access when runtime resume fails
- retain needs_resume until early resume succeeds and end system PHY
deferral after normal resume even when setup fails

Previous series:
https://lore.kernel.org/all/20260906034149.85550-1-hppiscas@xxxxxxx/

Pengpeng Hou (3):
usb: musb: omap2430: track PHY references and check initial setup
usb: musb: omap2430: stop runtime resume after PHY setup failure
usb: musb: omap2430: report system-resume PHY setup failures

drivers/usb/musb/omap2430.c | 123 ++++++++++++++++++++++++++++++++++++++------
1 file changed, 107 insertions(+), 16 deletions(-)

base-commit: f0100363d8c374bd8e9ea7c9ba02744f0b802ca4