Patch "phy: qcom-qmp-pcie: add pcs_misc sanity check" has been added to the 5.15-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    phy: qcom-qmp-pcie: add pcs_misc sanity check

to the 5.15-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     phy-qcom-qmp-pcie-add-pcs_misc-sanity-check.patch
and it can be found in the queue-5.15 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 8ead6de2dc7ebb10a2361ecc4891135ed1dc6d4c
Author: Johan Hovold <johan+linaro@xxxxxxxxxx>
Date:   Fri Sep 16 12:23:30 2022 +0200

    phy: qcom-qmp-pcie: add pcs_misc sanity check
    
    [ Upstream commit ecd5507e72ea03659dc2cc3e4393fbf8f4e2e02a ]
    
    Make sure that the (otherwise) optional pcs_misc IO region has been
    provided in case the configuration specifies a corresponding
    initialisation table to avoid crashing with malformed device trees.
    
    Note that the related debug message is now superfluous as the region is
    only used when the configuration has a pcs_misc table.
    
    Fixes: 421c9a0e9731 ("phy: qcom: qmp: Add SDM845 PCIe QMP PHY support")
    Signed-off-by: Johan Hovold <johan+linaro@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20220916102340.11520-2-johan+linaro@xxxxxxxxxx
    Signed-off-by: Vinod Koul <vkoul@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
index 38fd0c5c3797..77f861bad8da 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
@@ -5966,8 +5966,10 @@ int qcom_qmp_phy_create(struct device *dev, struct device_node *np, int id,
 	    of_device_is_compatible(dev->of_node, "qcom,ipq6018-qmp-pcie-phy"))
 		qphy->pcs_misc = qphy->pcs + 0x400;
 
-	if (!qphy->pcs_misc)
-		dev_vdbg(dev, "PHY pcs_misc-reg not used\n");
+	if (!qphy->pcs_misc) {
+		if (cfg->pcs_misc_tbl || cfg->pcs_misc_tbl_sec)
+			return -EINVAL;
+	}
 
 	/*
 	 * Get PHY's Pipe clock, if any. USB3 and PCIe are PIPE3



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux