From: Krzysztof Kozlowski <krzk@kernel.org>
To: george.moussalem@outlook.com,
Johannes Berg <johannes@sipsolutions.net>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Jeff Johnson <jjohnson@kernel.org>
Cc: linux-wireless@vger.kernel.org, devicetree@vger.kernel.org,
ath11k@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/6] wifi: ath11k: add multipd support for QCN6122
Date: Wed, 29 Oct 2025 15:43:37 +0100 [thread overview]
Message-ID: <5137cd11-004c-43ed-8bbb-646beb105844@kernel.org> (raw)
In-Reply-To: <20251029-ath11k-qcn6122-v1-5-58ed68eba333@outlook.com>
On 29/10/2025 15:26, George Moussalem via B4 Relay wrote:
> From: George Moussalem <george.moussalem@outlook.com>
>
> IPQ5018/QCN6122 platforms use multi PD (protection domains) to avoid
> having one instance of the running Q6 firmware crashing resulting in
> crashing the others.
>
> The IPQ5018 platform can have up to two QCN6122 wifi chips.
> To differentiate the two, the PD instance number (1 or 2) is added to
> the QMI service instance ID, which the QCN6122 firmware also expects.
> IPQ5018 internal wifi is always the first PD while QCN6122 cards must be
> second or third.
>
> Signed-off-by: George Moussalem <george.moussalem@outlook.com>
> ---
> See below patch for more info:
> https://lore.kernel.org/all/20231110091939.3025413-1-quic_mmanikan@quicinc.com/
I don't see any common part with that. Your bindings are completely
different and while PD was justified there, there is no such
justification here. Neither in the bindings.
> ---
> drivers/net/wireless/ath/ath11k/ahb.c | 31 +++++++++++++++++++++++++++++++
> drivers/net/wireless/ath/ath11k/core.h | 4 ++++
> drivers/net/wireless/ath/ath11k/pci.c | 1 +
> 3 files changed, 36 insertions(+)
>
> diff --git a/drivers/net/wireless/ath/ath11k/ahb.c b/drivers/net/wireless/ath/ath11k/ahb.c
> index 7b267dd62e964b2c4d6c3bbe016abd1ad0297219..820a383e88caf125892176e421b0121fed7e7055 100644
> --- a/drivers/net/wireless/ath/ath11k/ahb.c
> +++ b/drivers/net/wireless/ath/ath11k/ahb.c
> @@ -429,6 +429,7 @@ static void ath11k_ahb_init_qmi_ce_config(struct ath11k_base *ab)
> cfg->svc_to_ce_map_len = ab->hw_params.svc_to_ce_map_len;
> cfg->svc_to_ce_map = ab->hw_params.svc_to_ce_map;
> ab->qmi.service_ins_id = ab->hw_params.qmi_service_ins_id;
> + ab->qmi.service_ins_id += ab->userpd_id;
> }
>
> static void ath11k_ahb_free_ext_irq(struct ath11k_base *ab)
> @@ -1101,6 +1102,28 @@ static int ath11k_ahb_fw_resources_init(struct ath11k_base *ab)
> return ret;
> }
>
> +static int ath11k_get_userpd_id(struct device *dev, int *userpd)
> +{
> + int ret, userpd_id;
> +
> + ret = of_property_read_u32(dev->of_node, "qcom,userpd", &userpd_id);
> +
> + if (ret)
> + return ret;
> +
> + switch (userpd_id) {
> + case 2:
> + *userpd = ATH11K_QCN6122_USERPD_2;
> + break;
> + case 3:
> + *userpd = ATH11K_QCN6122_USERPD_3;
> + break;
> + default:
> + return -EINVAL;
> + }
> + return 0;
> +}
> +
> static int ath11k_ahb_fw_resource_deinit(struct ath11k_base *ab)
> {
> struct ath11k_ahb *ab_ahb = ath11k_ahb_priv(ab);
> @@ -1142,6 +1165,7 @@ static int ath11k_ahb_probe(struct platform_device *pdev)
> const struct ath11k_hif_ops *hif_ops;
> const struct ath11k_pci_ops *pci_ops;
> enum ath11k_hw_rev hw_rev;
> + int userpd_id = 0;
> int ret;
>
> hw_rev = (uintptr_t)device_get_match_data(&pdev->dev);
> @@ -1160,6 +1184,12 @@ static int ath11k_ahb_probe(struct platform_device *pdev)
> case ATH11K_HW_QCN6122_HW10:
> hif_ops = &ath11k_ahb_hif_ops_qcn6122;
> pci_ops = &ath11k_ahb_pci_ops_wcn6750;
> + ret = ath11k_get_userpd_id(&pdev->dev, &userpd_id);
> + if (ret) {
> + dev_err(&pdev->dev, "failed to get userpd: %d\n", ret);
> + return ret;
> + }
> + dev_info(&pdev->dev, "multi-pd architecture - userpd: %d\n", userpd_id);
This does not look like useful printk message. Drivers should be silent
on success:
https://elixir.bootlin.com/linux/v6.15-rc7/source/Documentation/process/coding-style.rst#L913
https://elixir.bootlin.com/linux/v6.15-rc7/source/Documentation/process/debugging/driver_development_debugging_guide.rst#L79
> break;
> default:
Best regards,
Krzysztof
next prev parent reply other threads:[~2025-10-29 14:43 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-29 14:26 [PATCH 0/6] wifi: ath11k: Add support for QCN6122 George Moussalem via B4 Relay
2025-10-29 14:26 ` [PATCH 1/6] dt: bindings: net: add bindings " George Moussalem via B4 Relay
2025-10-29 14:32 ` Krzysztof Kozlowski
2025-10-29 14:42 ` Krzysztof Kozlowski
2025-10-29 16:12 ` George Moussalem
2025-10-30 5:47 ` Krzysztof Kozlowski
2025-10-29 14:26 ` [PATCH 2/6] wifi: ath11k: add hw params " George Moussalem via B4 Relay
2025-10-29 14:26 ` [PATCH 3/6] wifi: ath11k: add hw ring mask " George Moussalem via B4 Relay
2025-10-29 14:33 ` Krzysztof Kozlowski
2025-10-29 14:26 ` [PATCH 4/6] wifi: ath11k: update hif and pci ops " George Moussalem via B4 Relay
2025-10-29 14:26 ` [PATCH 5/6] wifi: ath11k: add multipd support " George Moussalem via B4 Relay
2025-10-29 14:43 ` Krzysztof Kozlowski [this message]
2025-10-29 17:41 ` George Moussalem
2025-10-29 14:26 ` [PATCH 6/6] wifi: ath11k: add QCN6122 device support George Moussalem via B4 Relay
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5137cd11-004c-43ed-8bbb-646beb105844@kernel.org \
--to=krzk@kernel.org \
--cc=ath11k@lists.infradead.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=george.moussalem@outlook.com \
--cc=jjohnson@kernel.org \
--cc=johannes@sipsolutions.net \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox