Re: [PATCH v2 2/2] scsi: ufs-mediatek: keep mphy state in sync when va09 disable fails
From: Peter Wang
Date: Thu Nov 19 2026 - 00:33:17 EST
On Wed, 2026-11-18 at 11:20 +0800, Xiangwu Lai wrote:
>
> @@ -542,6 +542,14 @@ static int ufs_mtk_mphy_power_on(struct ufs_hba
> *hba, bool on)
> ufs_mtk_va09_pwr_ctrl(res, 0);
> ret = regulator_disable(host->reg_va09);
> }
> + /*
> + * The M-PHY is off regardless of the va09 result, so
> keep
> + * the state in sync with the hardware. Otherwise
> the next
> + * power-on bails out through the
> + * !(on ^ host->mphy_powered_on) check without
> powering the
> + * M-PHY back on.
> + */
> + host->mphy_powered_on = false;
Hi Xiangwu,
If the VA09 regulator_disable fails, could we just restore
the PHY power state?
Thanks
Peter