[PATCH v4 01/12] scsi: ufs: core: Introduce a new ufshcd vops negotiate_pwr_mode()
Bean Huo
beanhuo at iokpp.de
Mon Mar 23 02:10:12 PDT 2026
On Fri, 2026-03-20 at 20:10 -0700, Can Guo wrote:
> Most vendor specific implemenations of vops pwr_change_notify(PRE_CHANGE)
> are fulfilling two things at once:
> - Vendor specific target power mode negotiation
> - Vendor specific power mode change preparation
>
> When TX Equalization is added into consideration, before power mode change
> to a target power mode, TX Equalization Training (EQTR) needs be done for
> that target power mode. In addition, UFSHCI spec requires to start TX EQTR
> from HS-G1 (the most reliable High Speed Gear).
>
> Adding TX EQTR before pwr_change_notify(PRE_CHANGE) is not applicable
> because we don't know the negotiated power mode yet.
>
> Adding TX EQTR post pwr_change_notify(PRE_CHANGE) is inappropriate
> because pwr_change_notify(PRE_CHANGE) has finished preparation for a power
> mode change to negotiated power mode, yet we are changing power mode to
> HS-G1 for TX EQTR.
>
> Add a new vops negotiate_pwr_mode() so that vendor specific power mode
> negotiation can be fulfilled in its vendor specific implementations.
> Later on, TX EQTR can be added post vops negotiate_pwr_mode() and before
> vops pwr_change_notify(PRE_CHANGE).
>
> Signed-off-by: Can Guo <can.guo at oss.qualcomm.com>
Looks good to me. Let’s move forward!
Reviewed-by: Bean Huo <beanhuo at micron.com>
More information about the Linux-mediatek
mailing list