]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
scsi: ufs: qcom: Prevent calling phy_exit() before phy_init()
authorNitin Rawat <quic_nitirawa@quicinc.com>
Mon, 26 May 2025 15:38:12 +0000 (21:08 +0530)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 28 May 2025 02:13:18 +0000 (22:13 -0400)
Prevent calling phy_exit() before phy_init() to avoid abnormal power
count and the following warning during boot up.

[5.146763] phy phy-1d80000.phy.0: phy_power_on was called before phy_init

Fixes: 7bac65687510 ("scsi: ufs: qcom: Power off the PHY if it was already powered on in ufs_qcom_power_up_sequence()")
Signed-off-by: Nitin Rawat <quic_nitirawa@quicinc.com>
Link: https://lore.kernel.org/r/20250526153821.7918-2-quic_nitirawa@quicinc.com
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/ufs/host/ufs-qcom.c

index d23ff912fda494e642905c4c630fbe5bd922b9ab..dddc87e08739d7333a43ad754f7bbfd8c4d4ba72 100644 (file)
@@ -508,10 +508,9 @@ static int ufs_qcom_power_up_sequence(struct ufs_hba *hba)
        if (ret)
                return ret;
 
-       if (phy->power_count) {
+       if (phy->power_count)
                phy_power_off(phy);
-               phy_exit(phy);
-       }
+
 
        /* phy initialization - calibrate the phy */
        ret = phy_init(phy);