[PATCH v2] scsi: ufs: mediatek: handle mPHY power-on failures
Peter Wang
peter.wang at mediatek.com
Mon Sep 21 06:02:38 PDT 2026
On Sun, 2026-09-20 at 11:49 +0800, Pengpeng Hou wrote:
> The MediaTek helper enables VA09 before powering on the mPHY, but
> ignores the PHY result. A failure can leave VA09 enabled and publish
> mphy_powered_on as true, so a later power-on attempt is skipped.
>
> Check phy_power_on(), attempt to unwind VA09 on failure, and leave
> the
> state flag unchanged. Propagate the helper result from host
> initialization as well as its existing resume caller. Keep the
> original
> PHY error if the supply rollback also fails, and report that rollback
> separately.
>
> The issue was found by our static-analysis tool.
>
> Fixes: 561e3a8726b2 ("scsi: ufs-mediatek: Fix unbalanced clock
> on/off")
> Fixes: cf137b3ea49a ("scsi: ufs-mediatek: Support VA09 regulator
> operations")
> Assisted-by: gpt 5
> Signed-off-by: Pengpeng Hou <hppiscas at 163.com>
> ---
Reviewed-by: Peter Wang <peter.wang at mediatek.com>
More information about the linux-arm-kernel
mailing list