From: Peter Wang <peter.wang@mediatek.com>
To: Xiangwu Lai <laixiangwu@cmss.chinamobile.com>,
<chaotian.jing@mediatek.com>
Cc: <chu.stanley@gmail.com>, <alim.akhtar@samsung.com>,
<bvanassche@acm.org>, <stanley.chu@mediatek.com>,
<sashiko-bot@kernel.org>, <linux-scsi@vger.kernel.org>,
<linux-mediatek@lists.infradead.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 2/2] scsi: ufs-mediatek: keep mphy state in sync when va09 disable fails
Date: Thu, 19 Nov 2026 13:33:01 +0800 [thread overview]
Message-ID: <359c3c1f4b30aa837011788a847d5c2c1cb3880e.camel@mediatek.com> (raw)
In-Reply-To: <20261118032015.974-3-laixiangwu@cmss.chinamobile.com>
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
prev parent reply other threads:[~2026-11-19 5:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-18 3:20 [PATCH v2 0/2] scsi: ufs-mediatek: fix va09 regulator lifecycle Xiangwu Lai
2026-11-18 3:20 ` [PATCH v2 1/2] scsi: ufs-mediatek: use devm_regulator_get() for the va09 regulator Xiangwu Lai
2026-11-19 3:54 ` Peter Wang
2026-11-18 3:20 ` [PATCH v2 2/2] scsi: ufs-mediatek: keep mphy state in sync when va09 disable fails Xiangwu Lai
2026-11-19 5:33 ` Peter Wang [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=359c3c1f4b30aa837011788a847d5c2c1cb3880e.camel@mediatek.com \
--to=peter.wang@mediatek.com \
--cc=alim.akhtar@samsung.com \
--cc=bvanassche@acm.org \
--cc=chaotian.jing@mediatek.com \
--cc=chu.stanley@gmail.com \
--cc=laixiangwu@cmss.chinamobile.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-scsi@vger.kernel.org \
--cc=sashiko-bot@kernel.org \
--cc=stanley.chu@mediatek.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®