* [PATCH 1/2] phy: qcom: qmp-pcie: Select MFD_SYSCON for the multi-PHY driver
@ 2026-08-25 22:57 David Carlier
2026-08-25 22:57 ` [PATCH 2/2] phy: qcom: qmp-pcie: Check clock-output-names count in " David Carlier
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: David Carlier @ 2026-08-25 22:57 UTC (permalink / raw)
To: vkoul
Cc: neil.armstrong, qiang.yu, mani, konrad.dybcio, krishna.chundru,
linux-phy, linux-arm-msm, linux-kernel, David Carlier
The driver reads the active link mode through
syscon_regmap_lookup_by_phandle_args(). Without CONFIG_MFD_SYSCON the
stub returning -ENOTSUPP is compiled in instead, so probe fails for
every device and no PHY is ever registered.
Nothing in the build catches this: the driver still compiles, and arm64
defconfig happens to enable MFD_SYSCON through an unrelated select.
Fixes: 1781be3c8a5d ("phy: qcom: qmp-pcie: Add QMP PCIe Multi-PHY driver")
Signed-off-by: David Carlier <devnexen@gmail.com>
---
drivers/phy/qualcomm/Kconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/phy/qualcomm/Kconfig b/drivers/phy/qualcomm/Kconfig
index d910a5d1a1ac..9113e1099245 100644
--- a/drivers/phy/qualcomm/Kconfig
+++ b/drivers/phy/qualcomm/Kconfig
@@ -81,6 +81,7 @@ config PHY_QCOM_QMP_PCIE_MULTIPHY
tristate "Qualcomm QMP PCIe Multi PHY Driver"
depends on PCI || COMPILE_TEST
select GENERIC_PHY
+ select MFD_SYSCON
help
Enable this to support the QMP PCIe PHY transceiver that is used
with PCIe controllers on Qualcomm chips. This PHY is a single
--
2.55.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/2] phy: qcom: qmp-pcie: Check clock-output-names count in the multi-PHY driver
2026-08-25 22:57 [PATCH 1/2] phy: qcom: qmp-pcie: Select MFD_SYSCON for the multi-PHY driver David Carlier
@ 2026-08-25 22:57 ` David Carlier
2026-08-26 9:09 ` Konrad Dybcio
2026-09-02 13:58 ` Manivannan Sadhasivam
2026-08-26 9:09 ` [PATCH 1/2] phy: qcom: qmp-pcie: Select MFD_SYSCON for " Konrad Dybcio
` (2 subsequent siblings)
3 siblings, 2 replies; 7+ messages in thread
From: David Carlier @ 2026-08-25 22:57 UTC (permalink / raw)
To: vkoul
Cc: neil.armstrong, qiang.yu, mani, konrad.dybcio, krishna.chundru,
linux-phy, linux-arm-msm, linux-kernel, David Carlier
of_property_count_strings() returns a negative errno when the property
is missing or malformed. The value was passed straight to
devm_kcalloc(), whose overflow check rejected it, turning a device tree
problem into a bogus -ENOMEM with no diagnostic.
Fixes: 1781be3c8a5d ("phy: qcom: qmp-pcie: Add QMP PCIe Multi-PHY driver")
Signed-off-by: David Carlier <devnexen@gmail.com>
---
drivers/phy/qualcomm/phy-qcom-qmp-pcie-multiphy.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-multiphy.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-multiphy.c
index e93cba4369fb..e747ff9c3e5d 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-multiphy.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-multiphy.c
@@ -555,6 +555,9 @@ static int qmp_pcie_multiphy_register_clocks(struct device *dev,
int i, ret;
num_pipe_outputs = of_property_count_strings(np, "clock-output-names");
+ if (num_pipe_outputs < 0)
+ return dev_err_probe(dev, num_pipe_outputs,
+ "failed to read clock-output-names\n");
qmp_data->num_pipe_outputs = num_pipe_outputs;
qmp_data->pipe_out_clks = devm_kcalloc(dev, num_pipe_outputs,
--
2.55.0
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] phy: qcom: qmp-pcie: Select MFD_SYSCON for the multi-PHY driver
2026-08-25 22:57 [PATCH 1/2] phy: qcom: qmp-pcie: Select MFD_SYSCON for the multi-PHY driver David Carlier
2026-08-25 22:57 ` [PATCH 2/2] phy: qcom: qmp-pcie: Check clock-output-names count in " David Carlier
@ 2026-08-26 9:09 ` Konrad Dybcio
2026-09-02 13:56 ` Manivannan Sadhasivam
2026-10-03 15:25 ` Vinod Koul
3 siblings, 0 replies; 7+ messages in thread
From: Konrad Dybcio @ 2026-08-26 9:09 UTC (permalink / raw)
To: David Carlier, vkoul
Cc: neil.armstrong, qiang.yu, mani, krishna.chundru, linux-phy,
linux-arm-msm, linux-kernel
On 8/26/26 12:57 AM, David Carlier wrote:
> The driver reads the active link mode through
> syscon_regmap_lookup_by_phandle_args(). Without CONFIG_MFD_SYSCON the
> stub returning -ENOTSUPP is compiled in instead, so probe fails for
> every device and no PHY is ever registered.
>
> Nothing in the build catches this: the driver still compiles, and arm64
> defconfig happens to enable MFD_SYSCON through an unrelated select.
>
> Fixes: 1781be3c8a5d ("phy: qcom: qmp-pcie: Add QMP PCIe Multi-PHY driver")
> Signed-off-by: David Carlier <devnexen@gmail.com>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] phy: qcom: qmp-pcie: Check clock-output-names count in the multi-PHY driver
2026-08-25 22:57 ` [PATCH 2/2] phy: qcom: qmp-pcie: Check clock-output-names count in " David Carlier
@ 2026-08-26 9:09 ` Konrad Dybcio
2026-09-02 13:58 ` Manivannan Sadhasivam
1 sibling, 0 replies; 7+ messages in thread
From: Konrad Dybcio @ 2026-08-26 9:09 UTC (permalink / raw)
To: David Carlier, vkoul
Cc: neil.armstrong, qiang.yu, mani, krishna.chundru, linux-phy,
linux-arm-msm, linux-kernel
On 8/26/26 12:57 AM, David Carlier wrote:
> of_property_count_strings() returns a negative errno when the property
> is missing or malformed. The value was passed straight to
> devm_kcalloc(), whose overflow check rejected it, turning a device tree
> problem into a bogus -ENOMEM with no diagnostic.
>
> Fixes: 1781be3c8a5d ("phy: qcom: qmp-pcie: Add QMP PCIe Multi-PHY driver")
> Signed-off-by: David Carlier <devnexen@gmail.com>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Konrad
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] phy: qcom: qmp-pcie: Select MFD_SYSCON for the multi-PHY driver
2026-08-25 22:57 [PATCH 1/2] phy: qcom: qmp-pcie: Select MFD_SYSCON for the multi-PHY driver David Carlier
2026-08-25 22:57 ` [PATCH 2/2] phy: qcom: qmp-pcie: Check clock-output-names count in " David Carlier
2026-08-26 9:09 ` [PATCH 1/2] phy: qcom: qmp-pcie: Select MFD_SYSCON for " Konrad Dybcio
@ 2026-09-02 13:56 ` Manivannan Sadhasivam
2026-10-03 15:25 ` Vinod Koul
3 siblings, 0 replies; 7+ messages in thread
From: Manivannan Sadhasivam @ 2026-09-02 13:56 UTC (permalink / raw)
To: David Carlier
Cc: vkoul, neil.armstrong, qiang.yu, konrad.dybcio, krishna.chundru,
linux-phy, linux-arm-msm, linux-kernel
On Tue, Aug 25, 2026 at 11:57:28PM +0100, David Carlier wrote:
> The driver reads the active link mode through
> syscon_regmap_lookup_by_phandle_args(). Without CONFIG_MFD_SYSCON the
> stub returning -ENOTSUPP is compiled in instead, so probe fails for
> every device and no PHY is ever registered.
>
> Nothing in the build catches this: the driver still compiles, and arm64
> defconfig happens to enable MFD_SYSCON through an unrelated select.
>
> Fixes: 1781be3c8a5d ("phy: qcom: qmp-pcie: Add QMP PCIe Multi-PHY driver")
> Signed-off-by: David Carlier <devnexen@gmail.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
- Mani
--
மணிவண்ணன் சதாசிவம்
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/2] phy: qcom: qmp-pcie: Check clock-output-names count in the multi-PHY driver
2026-08-25 22:57 ` [PATCH 2/2] phy: qcom: qmp-pcie: Check clock-output-names count in " David Carlier
2026-08-26 9:09 ` Konrad Dybcio
@ 2026-09-02 13:58 ` Manivannan Sadhasivam
1 sibling, 0 replies; 7+ messages in thread
From: Manivannan Sadhasivam @ 2026-09-02 13:58 UTC (permalink / raw)
To: David Carlier
Cc: vkoul, neil.armstrong, qiang.yu, konrad.dybcio, krishna.chundru,
linux-phy, linux-arm-msm, linux-kernel
On Tue, Aug 25, 2026 at 11:57:29PM +0100, David Carlier wrote:
> of_property_count_strings() returns a negative errno when the property
> is missing or malformed. The value was passed straight to
> devm_kcalloc(), whose overflow check rejected it, turning a device tree
> problem into a bogus -ENOMEM with no diagnostic.
>
> Fixes: 1781be3c8a5d ("phy: qcom: qmp-pcie: Add QMP PCIe Multi-PHY driver")
> Signed-off-by: David Carlier <devnexen@gmail.com>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
- Mani
--
மணிவண்ணன் சதாசிவம்
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 1/2] phy: qcom: qmp-pcie: Select MFD_SYSCON for the multi-PHY driver
2026-08-25 22:57 [PATCH 1/2] phy: qcom: qmp-pcie: Select MFD_SYSCON for the multi-PHY driver David Carlier
` (2 preceding siblings ...)
2026-09-02 13:56 ` Manivannan Sadhasivam
@ 2026-10-03 15:25 ` Vinod Koul
3 siblings, 0 replies; 7+ messages in thread
From: Vinod Koul @ 2026-10-03 15:25 UTC (permalink / raw)
To: David Carlier
Cc: neil.armstrong, qiang.yu, mani, konrad.dybcio, krishna.chundru,
linux-phy, linux-arm-msm, linux-kernel
On Tue, 25 Aug 2026 23:57:28 +0100, David Carlier wrote:
> The driver reads the active link mode through
> syscon_regmap_lookup_by_phandle_args(). Without CONFIG_MFD_SYSCON the
> stub returning -ENOTSUPP is compiled in instead, so probe fails for
> every device and no PHY is ever registered.
>
> Nothing in the build catches this: the driver still compiles, and arm64
> defconfig happens to enable MFD_SYSCON through an unrelated select.
>
> [...]
Applied, thanks!
[1/2] phy: qcom: qmp-pcie: Select MFD_SYSCON for the multi-PHY driver
commit: 77a0e6ae5dec54fb6049e3ab88288bc40c81f9fd
[2/2] phy: qcom: qmp-pcie: Check clock-output-names count in the multi-PHY driver
commit: fb0f0e0e9e5dace7a6d9cde289537980ad35db3d
Best regards,
--
~Vinod
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-10-03 15:25 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-25 22:57 [PATCH 1/2] phy: qcom: qmp-pcie: Select MFD_SYSCON for the multi-PHY driver David Carlier
2026-08-25 22:57 ` [PATCH 2/2] phy: qcom: qmp-pcie: Check clock-output-names count in " David Carlier
2026-08-26 9:09 ` Konrad Dybcio
2026-09-02 13:58 ` Manivannan Sadhasivam
2026-08-26 9:09 ` [PATCH 1/2] phy: qcom: qmp-pcie: Select MFD_SYSCON for " Konrad Dybcio
2026-09-02 13:56 ` Manivannan Sadhasivam
2026-10-03 15:25 ` Vinod Koul
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®