* [PATCH 3/3] usb: musb: omap2430: Propagate PHY errors from system resume
@ 2026-09-06 3:41 Pengpeng Hou
0 siblings, 0 replies; only message in thread
From: Pengpeng Hou @ 2026-09-06 3:41 UTC (permalink / raw)
To: Bin Liu, Greg Kroah-Hartman
Cc: Pengpeng Hou, Tony Lindgren, linux-usb, linux-omap, linux-kernel
omap2430_resume() ignores phy_init() and phy_power_on() failures and
clears phy_suspended even when the PHY is not usable.
Return initialization errors and call phy_exit() when power-on fails
after a successful initialization. Clear phy_suspended only after both
operations succeed.
The issue was found by our static-analysis tool and manually reviewed.
Fixes: 68d9f95d6fd5 ("usb: musb: Fix suspend and resume issues for PHYs on I2C and SPI")
Assisted-by: gpt 5
Signed-off-by: Pengpeng Hou <hppiscas@163.com>
---
drivers/usb/musb/omap2430.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/musb/omap2430.c b/drivers/usb/musb/omap2430.c
index f881455a1a23..d95ffe7a2bfb 100644
--- a/drivers/usb/musb/omap2430.c
+++ b/drivers/usb/musb/omap2430.c
@@ -585,9 +585,17 @@ static int omap2430_resume(struct device *dev)
{
struct omap2430_glue *glue = dev_get_drvdata(dev);
struct musb *musb = glue_to_musb(glue);
+ int ret;
+
+ ret = phy_init(musb->phy);
+ if (ret)
+ return ret;
- phy_init(musb->phy);
- phy_power_on(musb->phy);
+ ret = phy_power_on(musb->phy);
+ if (ret) {
+ phy_exit(musb->phy);
+ return ret;
+ }
glue->phy_suspended = 0;
return 0;
--
2.50.1 (Apple Git-155)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-09-06 3:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-06 3:41 [PATCH 3/3] usb: musb: omap2430: Propagate PHY errors from system resume Pengpeng Hou
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®