Re: [PATCH v2 1/3] scsi: ufs: ufs-qcom: Restore TX Equalization settings on FOM failure

From: Bean Huo

Date: Wed Jul 01 2026 - 16:34:54 EST


On Thu, 2026-06-25 at 05:13 -0700, Can Guo wrote:
> ufs_qcom_get_rx_fom() applies temporary device TX Equalization values
> before forcing HS mode and running the EOM-based SW FOM scan.
>
> When one of these steps fails, the function can bypass the shared
> cleanup path and leave temporary TX Equalization settings programmed.
>
> Route those failures through the cleanup label so the original TX EQ
> settings are restored and link recovery runs before exit.
>
> This path also reuses ret for cleanup, so it may overwrite the original
> error. Keep that on purpose: if cleanup succeeds, the caller can proceed
> with the FOM result for the current iteration.
>
> Signed-off-by: Can Guo <can.guo@xxxxxxxxxxxxxxxx>

Loods good to me.

Reviewed-by: Bean Huo <beanhuo@xxxxxxxxxx>