From: netdev-bot+sashiko@kernel.org
To: manivannan.sadhasivam@oss.qualcomm.com
Cc: mani@kernel.org, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, horms@kernel.org,
jjohnson@kernel.org, linux-arm-msm@vger.kernel.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-wireless@vger.kernel.org, ath11k@lists.infradead.org,
ath12k@lists.infradead.org, andersson@kernel.org,
christopher.lew@oss.qualcomm.com, deepak.singh@oss.qualcomm.com,
raj.bhagat@oss.qualcomm.com, juha-matti.tilli@iki.fi,
jeff.hugo@oss.qualcomm.com
Subject: Re: [PATCH v2 3/4] wifi: ath11k: Connect to the QMI server belonging to the device owned by this driver
Date: Thu, 24 Sep 2026 05:26:11 +0000 [thread overview]
Message-ID: <179022757180.2160803.15859987957675595749@kernel.org> (raw)
In-Reply-To: <20260921-qrtr-multi-ep-v2-3-27dd80d841a0@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 2 potential
issue(s) to consider.
Critical: 0 · High: 1 · Medium: 0 · Low: 1
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [High] Incomplete fix: ath11k_qmi_ops_new_server() returns 0 (success)
when it decides to skip a WLFW server that belongs to the *other*…
- [Low] Concern that the commit fixes a real user-visible multi-device
initialization bug (identical ath11k PCIe cards connecting to each…
--
wifi: ath11k: Connect to the QMI server belonging to the device owned by this driver
This adds a get_qrtr_node_id() HIF callback returning the QRTR node id
derived from the MHI controller index, and uses it in the QMI new_server
callback so a device only connects to the WLFW server running on its own
node. A node id of zero keeps the previous unfiltered behaviour.
[Severity: Low]
This isn't a bug, but the commit fixes a user-visible misbehaviour (two
identical ath11k PCIe cards connecting to each other's WLFW firmware) and
carries no Fixes: trailer.
The fix depends on qrtr_host_node_id()/QRTR_NODE_HOST_BASE in
include/net/qrtr.h and on the host-assigned node id plus the
NEW_SERVER/DEL_SERVER node rewrite from the preceding net/qrtr patches, so
a Fixes: tag pointing at the original ath11k commit would invite stable
tooling to pick this up without those dependencies.
Would it help to say so explicitly in the commit message, for example
"depends on the preceding net/qrtr changes; not suitable for stable on its
own", instead of leaving the tag out silently?
> diff --git a/drivers/net/wireless/ath/ath11k/qmi.c b/drivers/net/wireless/ath/ath11k/qmi.c
> index 7dc07339b9579..dadf78f30b897 100644
> --- a/drivers/net/wireless/ath/ath11k/qmi.c
> +++ b/drivers/net/wireless/ath/ath11k/qmi.c
> @@ -3170,8 +3170,18 @@ static int ath11k_qmi_ops_new_server(struct qmi_handle *qmi_hdl,
> struct ath11k_qmi *qmi = container_of(qmi_hdl, struct ath11k_qmi, handle);
> struct ath11k_base *ab = qmi->ab;
> struct sockaddr_qrtr *sq = &qmi->sq;
> + int node_id;
> int ret;
>
> + /* Identical devices advertise the same QMI services, so connect only to
> + * the QMI server on this device's node. A node id of 0 means the
> + * transport has not assigned a unique node id, so accept the server
> + * unfiltered.
> + */
> + node_id = ath11k_hif_get_qrtr_node_id(ab);
> + if (node_id && service->node != node_id)
> + return 0;
> +
[Severity: High]
Should this return a negative errno rather than 0 when the server belongs
to the other device's node?
The QMI core only drops the service record when ->new_server() returns a
negative value:
drivers/soc/qcom/qmi_interface.c:qmi_recv_new_server() {
...
ret = ops->new_server(qmi, svc);
if (ret < 0)
kfree(svc);
else
list_add(&svc->list_node, &qmi->lookup_results);
}
So returning 0 here keeps the foreign node's WLFW service on this handle's
lookup_results list, even though we deliberately did not connect to it.
When that foreign server later goes away (sibling firmware crash, unbind of
the other card, or its MHI endpoint unregistering), net/qrtr/ns.c
server_del()/ctrl_cmd_bye() call lookup_notify() for every lookup matching
the service/instance, which reaches this device's handle:
drivers/soc/qcom/qmi_interface.c:qmi_recv_del_server() {
list_for_each_entry_safe(svc, tmp, &qmi->lookup_results, list_node) {
if (node != -1 && svc->node != node)
continue;
...
if (ops->del_server)
ops->del_server(qmi, svc);
}
ath11k_qmi_ops_del_server() does no node filtering and posts
ATH11K_QMI_EVENT_SERVER_EXIT unconditionally, which in
ath11k_qmi_driver_event_work() does:
case ATH11K_QMI_EVENT_SERVER_EXIT:
set_bit(ATH11K_FLAG_CRASH_FLUSH, &ab->dev_flags);
set_bit(ATH11K_FLAG_RECOVERY, &ab->dev_flags);
if (!ab->is_reset)
ath11k_core_pre_reconfigure_recovery(ab);
Can this drive crash-flush and recovery on the healthy device whose own
firmware never went down? Since the new filter also rejects the foreign
node's re-announcement, no matching SERVER_ARRIVE follows, so does that
adapter stay stuck with ATH11K_FLAG_CRASH_FLUSH and ATH11K_FLAG_RECOVERY
set until the driver is reloaded?
Would returning a negative errno here (so the core frees the record), and/or
adding the same node id check to ath11k_qmi_ops_del_server(), cover the
del_server side of the cross-device confusion as well?
> sq->sq_family = AF_QIPCRTR;
> sq->sq_node = service->node;
> sq->sq_port = service->port;
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20260921-qrtr-multi-ep-v2-0-27dd80d841a0%40oss.qualcomm.com
next prev parent reply other threads:[~2026-09-24 5:26 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-21 11:23 [PATCH v2 0/4] net: qrtr: Add support for using identical MHI endpoint devices Manivannan Sadhasivam via B4 Relay
2026-09-21 11:23 ` [PATCH v2 1/4] net: qrtr: Allow the host QRTR to assign a unique node id Manivannan Sadhasivam via B4 Relay
2026-09-22 17:08 ` Youssef Samir
2026-09-23 16:40 ` Manivannan Sadhasivam
2026-09-24 5:26 ` netdev-bot+sashiko
2026-09-21 11:23 ` [PATCH v2 2/4] net: qrtr: Assign unique node id for MHI endpoints Manivannan Sadhasivam via B4 Relay
2026-09-22 17:14 ` Youssef Samir
2026-09-22 17:24 ` Juha-Matti Tilli
2026-09-23 15:03 ` Youssef Samir
2026-09-24 5:26 ` netdev-bot+sashiko
2026-09-21 11:23 ` [PATCH v2 3/4] wifi: ath11k: Connect to the QMI server belonging to the device owned by this driver Manivannan Sadhasivam via B4 Relay
2026-09-21 16:28 ` Juha-Matti Tilli
2026-09-22 11:02 ` Vasanthakumar Thiagarajan
2026-09-22 13:27 ` Manivannan Sadhasivam
2026-09-24 5:26 ` netdev-bot+sashiko [this message]
2026-09-21 11:23 ` [PATCH v2 4/4] wifi: ath12k: " Manivannan Sadhasivam via B4 Relay
2026-09-22 11:05 ` Vasanthakumar Thiagarajan
2026-09-22 11:43 ` Juha-Matti Tilli
2026-09-22 13:30 ` Manivannan Sadhasivam
2026-09-22 14:53 ` Juha-Matti Tilli
2026-09-24 5:26 ` netdev-bot+sashiko
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=179022757180.2160803.15859987957675595749@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=andersson@kernel.org \
--cc=ath11k@lists.infradead.org \
--cc=ath12k@lists.infradead.org \
--cc=christopher.lew@oss.qualcomm.com \
--cc=davem@davemloft.net \
--cc=deepak.singh@oss.qualcomm.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jeff.hugo@oss.qualcomm.com \
--cc=jjohnson@kernel.org \
--cc=juha-matti.tilli@iki.fi \
--cc=kuba@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=mani@kernel.org \
--cc=manivannan.sadhasivam@oss.qualcomm.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=raj.bhagat@oss.qualcomm.com \
/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
all inboxes | Powered by JetHome®