Skip to contentSkip to conversation

phy: qcom: edp: Fix NULL pointer dereference for phy v6 (x1e80100)

PATCH Applied Val Packett 6 participants 6 messages Jan 11 – Jan 14

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 phy: qcom: edp: Fix NULL pointer dereference for phy v6 (x1e80100)

For Glymur SoC support, the com_clk_fwd_cfg callback was added, and a stub implementation was added for the v4 of the hardware. However it was omitted for the v6, causing a NULL pointer dereference oops on Hamoa/Purwa (X1E/X1P) SoC devices. Fix by adding the appropriate stub.

Fixes add66a6673bc ("phy: qcom: edp: Add Glymur platform support")

---
v2: pull R-b, reuse v4 function as suggested by Konrad
v1: https://lore.kernel.org/all/[email protected]/

 drivers/phy/qualcomm/phy-qcom-edp.c | 1 +
 1 file changed, 1 insertion(+)
drivers/phy/qualcomm/phy-qcom-edp.c +1 -0
index 13feab99feec..7372de05a0b8 100644
@@ -758,6 +758,7 @@ static const struct phy_ver_ops qcom_edp_phy_ops_v6 = {
 	.com_power_on		= qcom_edp_phy_power_on_v6,
 	.com_resetsm_cntrl	= qcom_edp_phy_com_resetsm_cntrl_v6,
 	.com_bias_en_clkbuflr	= qcom_edp_com_bias_en_clkbuflr_v6,
+	.com_clk_fwd_cfg	= qcom_edp_com_clk_fwd_cfg_v4,
 	.com_configure_pll	= qcom_edp_com_configure_pll_v6,
 	.com_configure_ssc	= qcom_edp_com_configure_ssc_v6,
 };
Signature · 1 line
2.51.2
Reviewed-by on v2 1/1
#1 lore raw
Quoted 8 lines · Val Packett

For Glymur SoC support, the com_clk_fwd_cfg callback was added, and a stub implementation was added for the v4 of the hardware. However it was omitted for the v6, causing a NULL pointer dereference oops on Hamoa/Purwa (X1E/X1P) SoC devices. Fix by adding the appropriate stub.

Fixes add66a6673bc ("phy: qcom: edp: Add Glymur platform support")
Quoted 7 lines

---
v2: pull R-b, reuse v4 function as suggested by Konrad
v1: https://lore.kernel.org/all/[email protected]/

 drivers/phy/qualcomm/phy-qcom-edp.c | 1 +
 1 file changed, 1 insertion(+)
Signature · 2 lines
With best wishes
Dmitry
Reviewed-by on v2 1/1
#2 lore raw
In reply to Val Packett
Quoted 9 lines · Val Packett

For Glymur SoC support, the com_clk_fwd_cfg callback was added, and a stub implementation was added for the v4 of the hardware. However it was omitted for the v6, causing a NULL pointer dereference oops on Hamoa/Purwa (X1E/X1P) SoC devices. Fix by adding the appropriate stub.

Fixes add66a6673bc ("phy: qcom: edp: Add Glymur platform support")

---

Konrad

Tested-by on v2 1/1
#3 lore raw
In reply to Val Packett
Quoted 20 lines · Val Packett

For Glymur SoC support, the com_clk_fwd_cfg callback was added, and a stub implementation was added for the v4 of the hardware. However it was omitted for the v6, causing a NULL pointer dereference oops on Hamoa/Purwa (X1E/X1P) SoC devices. Fix by adding the appropriate stub.

Fixes add66a6673bc ("phy: qcom: edp: Add Glymur platform support")

---
v2: pull R-b, reuse v4 function as suggested by Konrad
v1: https://lore.kernel.org/all/[email protected]/

  drivers/phy/qualcomm/phy-qcom-edp.c | 1 +
  1 file changed, 1 insertion(+)
drivers/phy/qualcomm/phy-qcom-edp.c +0 -0
index 13feab99feec..7372de05a0b8 100644

drivers/phy/qualcomm/phy-qcom-edp.c static const struct phy_ver_ops qcom_edp_phy_ops_v6 = { · line 764

Quoted 7 lines
drivers/phy/qualcomm/phy-qcom-edp.c +1 -0
@@ -758,6 +758,7 @@ static const struct phy_ver_ops qcom_edp_phy_ops_v6 = {
  	.com_power_on		= qcom_edp_phy_power_on_v6,
  	.com_resetsm_cntrl	= qcom_edp_phy_com_resetsm_cntrl_v6,
  	.com_bias_en_clkbuflr	= qcom_edp_com_bias_en_clkbuflr_v6,
+	.com_clk_fwd_cfg	= qcom_edp_com_clk_fwd_cfg_v4,
  	.com_configure_pll	= qcom_edp_com_configure_pll_v6,
  	.com_configure_ssc	= qcom_edp_com_configure_ssc_v6,
  };
Signature · 2 lines
Best Regards,
Yijie
reviewer Reviewed-by on v2 1/1
#4 lore raw
In reply to Val Packett
Quoted 20 lines · Val Packett

For Glymur SoC support, the com_clk_fwd_cfg callback was added, and a stub implementation was added for the v4 of the hardware. However it was omitted for the v6, causing a NULL pointer dereference oops on Hamoa/Purwa (X1E/X1P) SoC devices. Fix by adding the appropriate stub.

Fixes add66a6673bc ("phy: qcom: edp: Add Glymur platform support")

---
v2: pull R-b, reuse v4 function as suggested by Konrad
v1: https://lore.kernel.org/all/[email protected]/

  drivers/phy/qualcomm/phy-qcom-edp.c | 1 +
  1 file changed, 1 insertion(+)
drivers/phy/qualcomm/phy-qcom-edp.c +0 -0
index 13feab99feec..7372de05a0b8 100644

drivers/phy/qualcomm/phy-qcom-edp.c static const struct phy_ver_ops qcom_edp_phy_ops_v6 = { · line 764

Quoted 7 lines
drivers/phy/qualcomm/phy-qcom-edp.c +1 -0
@@ -758,6 +758,7 @@ static const struct phy_ver_ops qcom_edp_phy_ops_v6 = {
  	.com_power_on		= qcom_edp_phy_power_on_v6,
  	.com_resetsm_cntrl	= qcom_edp_phy_com_resetsm_cntrl_v6,
  	.com_bias_en_clkbuflr	= qcom_edp_com_bias_en_clkbuflr_v6,
+	.com_clk_fwd_cfg	= qcom_edp_com_clk_fwd_cfg_v4,
  	.com_configure_pll	= qcom_edp_com_configure_pll_v6,
  	.com_configure_ssc	= qcom_edp_com_configure_ssc_v6,
  };

Thanks,
Neil

maintainer Applied
#5 lore raw
In reply to Val Packett
Quoted 6 lines · Val Packett

For Glymur SoC support, the com_clk_fwd_cfg callback was added, and a stub implementation was added for the v4 of the hardware. However it was omitted for the v6, causing a NULL pointer dereference oops on Hamoa/Purwa (X1E/X1P) SoC devices. Fix by adding the appropriate stub.

Applied, thanks!

[1/1] phy: qcom: edp: Fix NULL pointer dereference for phy v6 (x1e80100)

      commit: 70812056fbfb9348788e35b7641ff959b711840e

Best regards,

Signature · 1 line
~Vinod