[PATCH v3 2/2] phy: qcom: qmp-combo: check qmp_combo_com_init() in the typec callbacks
Oleg Keri
okerixx at gmail.com
Wed Oct 21 05:25:37 PDT 2026
Static, as the v3 cover letter says ("found by inspection. It needs the
bringup to fail"). qmp_combo_com_init() can only fail in
regulator_bulk_enable(), the reset assert/deassert or the clock enables,
and none of those has ever failed on this machine across several hundred
boots with the dock plugged, unplugged and flipped. What I did hit is
patch 1, the "already disabled" warnings from the altmode worker once
runtime PM is allowed from userspace. That log is in 1/2.
To see what Sashiko's scenario actually does I made the forced bringup
fail once by fault injection (return -EIO after the reset assert, i.e.
the com_init() error path runs: regulators off, PHY in reset) and flipped
the dock cable. On next-20261020 with 1/2 applied and the bringup path
otherwise stock: dwc3's phy_power_on() immediately reports "phy
initialization timed-out", and from then on USB3 and DP on that port are
dead while USB2 keeps working. Unplugging the dock runs phy_power_off()
on the unpowered PHY. The writes are swallowed, no SEA on this SoC, but
nothing recovers either: a replug in the same orientation never
re-initialises the PHY because the driver still counts it as up. So no
panic, a silently dead port until the next orientation change.
2/2 doesn't fix that, it only stops the register writes in the callback
itself. I have a v4 that drops 2/2 and instead stops the Type-C
callbacks from releasing and re-acquiring the regulators and clocks on
every orientation or mode change. They only reset and reprogram the
common block, so a failed reconfiguration can no longer leave the PHY
counted as up with its power off. With the same injection on that code
the callback returns the error, the PHY stays powered, and the next
Type-C event brings USB3 and DP back.
Konrad, do you want v4 with that change, or .. ?
Oleg
More information about the linux-phy
mailing list