public inbox for linux-phy@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] phy: qcom: edp: Fix NULL pointer dereference for phy v6 (x1e80100)
@ 2026-01-09  4:50 Val Packett
  2026-01-09  9:23 ` Abel Vesa
  2026-01-09 10:49 ` Konrad Dybcio
  0 siblings, 2 replies; 4+ messages in thread
From: Val Packett @ 2026-01-09  4:50 UTC (permalink / raw)
  To: Vinod Koul, Neil Armstrong, Abel Vesa, Dmitry Baryshkov
  Cc: Val Packett, linux-arm-msm, linux-phy, linux-kernel

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")
Signed-off-by: Val Packett <val@packett.cool>
---
 drivers/phy/qualcomm/phy-qcom-edp.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/phy/qualcomm/phy-qcom-edp.c b/drivers/phy/qualcomm/phy-qcom-edp.c
index 13feab99feec..a17492db21d8 100644
--- a/drivers/phy/qualcomm/phy-qcom-edp.c
+++ b/drivers/phy/qualcomm/phy-qcom-edp.c
@@ -613,6 +613,11 @@ static int qcom_edp_phy_com_resetsm_cntrl_v6(const struct qcom_edp *edp)
 				     val, val & BIT(0), 500, 10000);
 }
 
+static int qcom_edp_com_clk_fwd_cfg_v6(const struct qcom_edp *edp)
+{
+	return 0;
+}
+
 static int qcom_edp_com_bias_en_clkbuflr_v6(const struct qcom_edp *edp)
 {
 	/* Turn on BIAS current for PHY/PLL */
@@ -758,6 +763,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_v6,
 	.com_configure_pll	= qcom_edp_com_configure_pll_v6,
 	.com_configure_ssc	= qcom_edp_com_configure_ssc_v6,
 };
-- 
2.51.2


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] phy: qcom: edp: Fix NULL pointer dereference for phy v6 (x1e80100)
  2026-01-09  4:50 [PATCH] phy: qcom: edp: Fix NULL pointer dereference for phy v6 (x1e80100) Val Packett
@ 2026-01-09  9:23 ` Abel Vesa
  2026-01-09 10:49 ` Konrad Dybcio
  1 sibling, 0 replies; 4+ messages in thread
From: Abel Vesa @ 2026-01-09  9:23 UTC (permalink / raw)
  To: Val Packett
  Cc: Vinod Koul, Neil Armstrong, Abel Vesa, Dmitry Baryshkov,
	linux-arm-msm, linux-phy, linux-kernel

On 26-01-09 01:50:28, Val Packett wrote:
> 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")
> Signed-off-by: Val Packett <val@packett.cool>

Thanks for catching this.

Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com>

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] phy: qcom: edp: Fix NULL pointer dereference for phy v6 (x1e80100)
  2026-01-09  4:50 [PATCH] phy: qcom: edp: Fix NULL pointer dereference for phy v6 (x1e80100) Val Packett
  2026-01-09  9:23 ` Abel Vesa
@ 2026-01-09 10:49 ` Konrad Dybcio
  2026-01-13  8:10   ` Neil Armstrong
  1 sibling, 1 reply; 4+ messages in thread
From: Konrad Dybcio @ 2026-01-09 10:49 UTC (permalink / raw)
  To: Val Packett, Vinod Koul, Neil Armstrong, Abel Vesa,
	Dmitry Baryshkov
  Cc: linux-arm-msm, linux-phy, linux-kernel

On 1/9/26 5:50 AM, Val Packett wrote:
> 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")
> Signed-off-by: Val Packett <val@packett.cool>
> ---
>  drivers/phy/qualcomm/phy-qcom-edp.c | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/drivers/phy/qualcomm/phy-qcom-edp.c b/drivers/phy/qualcomm/phy-qcom-edp.c
> index 13feab99feec..a17492db21d8 100644
> --- a/drivers/phy/qualcomm/phy-qcom-edp.c
> +++ b/drivers/phy/qualcomm/phy-qcom-edp.c
> @@ -613,6 +613,11 @@ static int qcom_edp_phy_com_resetsm_cntrl_v6(const struct qcom_edp *edp)
>  				     val, val & BIT(0), 500, 10000);
>  }
>  
> +static int qcom_edp_com_clk_fwd_cfg_v6(const struct qcom_edp *edp)
> +{
> +	return 0;
> +}
> +
>  static int qcom_edp_com_bias_en_clkbuflr_v6(const struct qcom_edp *edp)
>  {
>  	/* Turn on BIAS current for PHY/PLL */
> @@ -758,6 +763,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_v6,

Let's just point it to the existing qcom_edp_com_clk_fwd_cfg_v4

Konrad

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] phy: qcom: edp: Fix NULL pointer dereference for phy v6 (x1e80100)
  2026-01-09 10:49 ` Konrad Dybcio
@ 2026-01-13  8:10   ` Neil Armstrong
  0 siblings, 0 replies; 4+ messages in thread
From: Neil Armstrong @ 2026-01-13  8:10 UTC (permalink / raw)
  To: Konrad Dybcio, Val Packett, Vinod Koul, Abel Vesa,
	Dmitry Baryshkov
  Cc: linux-arm-msm, linux-phy, linux-kernel

On 1/9/26 11:49, Konrad Dybcio wrote:
> On 1/9/26 5:50 AM, Val Packett wrote:
>> 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")
>> Signed-off-by: Val Packett <val@packett.cool>
>> ---
>>   drivers/phy/qualcomm/phy-qcom-edp.c | 6 ++++++
>>   1 file changed, 6 insertions(+)
>>
>> diff --git a/drivers/phy/qualcomm/phy-qcom-edp.c b/drivers/phy/qualcomm/phy-qcom-edp.c
>> index 13feab99feec..a17492db21d8 100644
>> --- a/drivers/phy/qualcomm/phy-qcom-edp.c
>> +++ b/drivers/phy/qualcomm/phy-qcom-edp.c
>> @@ -613,6 +613,11 @@ static int qcom_edp_phy_com_resetsm_cntrl_v6(const struct qcom_edp *edp)
>>   				     val, val & BIT(0), 500, 10000);
>>   }
>>   
>> +static int qcom_edp_com_clk_fwd_cfg_v6(const struct qcom_edp *edp)
>> +{
>> +	return 0;
>> +}
>> +
>>   static int qcom_edp_com_bias_en_clkbuflr_v6(const struct qcom_edp *edp)
>>   {
>>   	/* Turn on BIAS current for PHY/PLL */
>> @@ -758,6 +763,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_v6,
> 
> Let's just point it to the existing qcom_edp_com_clk_fwd_cfg_v4

Yes

Neil

> 
> Konrad


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-01-13  8:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-09  4:50 [PATCH] phy: qcom: edp: Fix NULL pointer dereference for phy v6 (x1e80100) Val Packett
2026-01-09  9:23 ` Abel Vesa
2026-01-09 10:49 ` Konrad Dybcio
2026-01-13  8:10   ` Neil Armstrong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox