mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Thorsten Leemhuis <linux@leemhuis.info>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Linux kernel regressions list <regressions@lists.linux.dev>,
	LKML <linux-kernel@vger.kernel.org>
Subject: [PATCH] net: qrtr: resend HELLO on MHI resume
Date: Sun, 20 Sep 2026 16:16:08 +0200	[thread overview]
Message-ID: <20260920141608.2977460-1-linux@leemhuis.info> (raw)
In-Reply-To: <1f3e8e4b-2060-4edc-aa58-d2b7a68280ca@leemhuis.info>

From: Daniel J Blueman <daniel@quora.org>

Since the MHI HELLO exchange was relocated, it is sent only at device
registration. During a suspend-resume cycle, the firmware in WiFi
cards such as WCN7850 indefinitely waits for another HELLO,
triggering:

  ath12k_wifi7_pci 0004:01:00.0: timeout while waiting for restart complete
  ath12k_wifi7_pci 0004:01:00.0: failed to resume core: -110

Fix this by triggering the handshake from resume_early in the MHI
transport.

Validated on Qualcomm X1E-801800 on Lenovo Slim 7x across 10
suspend-resume cycles.

Fixes: 544d85de4dc2 ("net: qrtr: Send HELLO message on endpoint register")
Signed-off-by: Daniel J Blueman <daniel@quora.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@oss.qualcomm.com>
Reported-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
Link: https://lore.kernel.org/all/6257c447-788d-4362-851e-0d552bcf7c56@oss.qualcomm.com/
Tested-by: Jeff Johnson <jeff.johnson@oss.qualcomm.com>
Reported-by: Vlastimil Babka (SUSE) <vbabka@suse.com>
Link: https://lore.kernel.org/all/ab1491bb-cca5-4145-ac7d-31c966abf7b4@suse.com/
Tested-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>
Reported-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/all/87a4plsg4w.wl-tiwai@suse.de/
Tested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Thorsten Leemhuis <linux@leemhuis.info>
---

Hi Linus, as mentioned earlier in this thread, would be great if you
could merge this directly to fix an annoying regression. Ciao, THorsteh

---
 net/qrtr/af_qrtr.c | 13 +++++++++++++
 net/qrtr/mhi.c     |  9 ++++++++-
 net/qrtr/qrtr.h    |  2 ++
 3 files changed, 23 insertions(+), 1 deletion(-)

diff --git net/qrtr/af_qrtr.c net/qrtr/af_qrtr.c
index 78347c937af76b..e7b3647424b8f1 100644
--- net/qrtr/af_qrtr.c
+++ net/qrtr/af_qrtr.c
@@ -623,6 +623,19 @@ static void qrtr_hello_work(struct work_struct *work)
 	qrtr_port_put(ctrl);
 }
 
+/* Trigger the HELLO handshake after the remote has been reset, eg on resume */
+void qrtr_endpoint_hello(struct qrtr_endpoint *ep)
+{
+	struct qrtr_node *node = ep->node;
+
+	mutex_lock(&node->ep_lock);
+	node->hello_sent = false;
+	mutex_unlock(&node->ep_lock);
+
+	schedule_delayed_work(&node->say_hello, 0);
+}
+EXPORT_SYMBOL_GPL(qrtr_endpoint_hello);
+
 /**
  * qrtr_endpoint_register() - register a new endpoint
  * @ep: endpoint to register
diff --git net/qrtr/mhi.c net/qrtr/mhi.c
index 3990da1a65dc4f..e9a4bb92ce76ff 100644
--- net/qrtr/mhi.c
+++ net/qrtr/mhi.c
@@ -183,6 +183,7 @@ static int __maybe_unused qcom_mhi_qrtr_pm_suspend_late(struct device *dev)
 static int __maybe_unused qcom_mhi_qrtr_pm_resume_early(struct device *dev)
 {
 	struct mhi_device *mhi_dev = container_of(dev, struct mhi_device, dev);
+	struct qrtr_mhi_dev *qdev = dev_get_drvdata(dev);
 	enum mhi_state state;
 	int rc;
 
@@ -201,7 +202,13 @@ static int __maybe_unused qcom_mhi_qrtr_pm_resume_early(struct device *dev)
 		return rc;
 	}
 
-	return qcom_mhi_qrtr_queue_dl_buffers(mhi_dev);
+	rc = qcom_mhi_qrtr_queue_dl_buffers(mhi_dev);
+	if (rc)
+		return rc;
+
+	qrtr_endpoint_hello(&qdev->ep);
+
+	return 0;
 }
 
 static const struct dev_pm_ops qcom_mhi_qrtr_pm_ops = {
diff --git net/qrtr/qrtr.h net/qrtr/qrtr.h
index 3f2d28696062a5..de2de69a619936 100644
--- net/qrtr/qrtr.h
+++ net/qrtr/qrtr.h
@@ -27,6 +27,8 @@ int qrtr_endpoint_register(struct qrtr_endpoint *ep, unsigned int nid);
 
 void qrtr_endpoint_unregister(struct qrtr_endpoint *ep);
 
+void qrtr_endpoint_hello(struct qrtr_endpoint *ep);
+
 int qrtr_endpoint_post(struct qrtr_endpoint *ep, const void *data, size_t len);
 
 int qrtr_ns_init(void);

base-commit: 5dd1818b15d98d4a20806cd00b1b40320b06004f
-- 
2.55.0


  reply	other threads:[~2026-09-20 14:16 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-20 14:10 Quick regression status pre 7.3-rc4 Thorsten Leemhuis
2026-09-20 14:16 ` Thorsten Leemhuis [this message]
2026-09-20 18:26   ` [PATCH] net: qrtr: resend HELLO on MHI resume Linus Torvalds
2026-09-21  4:20     ` Thorsten Leemhuis
  -- strict thread matches above, loose matches on Subject: below --
2026-09-09  5:58 Daniel J Blueman
2026-09-11 10:44 ` Manivannan Sadhasivam
2026-09-15 10:48   ` Vlastimil Babka
2026-09-16  3:09     ` Jeff Johnson
2026-09-16  9:36       ` Thorsten Leemhuis
2026-09-14  9:04 ` Thorsten Leemhuis
2026-09-14  9:39   ` Takashi Iwai
2026-09-15 10:11   ` Vlastimil Babka
2026-09-15 10:45     ` Vlastimil Babka (SUSE)
2026-09-18 17:05 ` Manivannan Sadhasivam
2026-09-21  7:58   ` Vlastimil Babka

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=20260920141608.2977460-1-linux@leemhuis.info \
    --to=linux@leemhuis.info \
    --cc=linux-kernel@vger.kernel.org \
    --cc=regressions@lists.linux.dev \
    --cc=torvalds@linux-foundation.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

all inboxes | Powered by JetHome®