Linux-Wireless Archive mirror
 help / color / mirror / Atom feed
From: Marc Gonzalez <mgonzalez@freebox.fr>
To: Kalle Valo <kvalo@kernel.org>,
	Jeff Johnson <quic_jjohnson@quicinc.com>,
	ath10k <ath10k@lists.infradead.org>
Cc: wireless <linux-wireless@vger.kernel.org>,
	DT <devicetree@vger.kernel.org>,
	MSM <linux-arm-msm@vger.kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Pierre-Hugues Husson <phhusson@freebox.fr>,
	Arnaud Vrac <avrac@freebox.fr>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konrad.dybcio@linaro.org>,
	Jami Kettunen <jamipkettunen@gmail.com>,
	Jeffrey Hugo <jeffrey.l.hugo@gmail.com>
Subject: [PATCH v2 2/3] wifi: ath10k: fake missing MSA_READY indicator
Date: Thu, 28 Mar 2024 18:38:15 +0100	[thread overview]
Message-ID: <45448d42-bc48-4b9e-adca-59a47e0674f5@freebox.fr> (raw)
In-Reply-To: <fd26ce4a-a9f3-4ada-8d46-ed36fb2456ca@freebox.fr>

The ath10k driver waits for an "MSA_READY" indicator
to complete initialization. If the indicator is not
received, then the device remains unusable.

Several msm8998-based devices are affected by this issue.
Oddly, it seems safe to NOT wait for the indicator, and
proceed immediately when QMI_EVENT_SERVER_ARRIVE.

fw_version 0x100204b2
fw_build_timestamp 2019-09-04 03:01
fw_build_id QC_IMAGE_VERSION_STRING=WLAN.HL.1.0-01202-QCAHLSWMTPLZ-1.221523.2

Jeff Johnson wrote:

  The feedback I received was "it might be ok to change all ath10k qmi
  to skip waiting for msa_ready", and it was pointed out that ath11k
  (and ath12k) do not wait for it.

  However with so many deployed devices, "might be ok" isn't a strong
  argument for changing the default behavior.

Signed-off-by: Pierre-Hugues Husson <phhusson@freebox.fr>
Signed-off-by: Marc Gonzalez <mgonzalez@freebox.fr>
---
 drivers/net/wireless/ath/ath10k/qmi.c | 7 +++++++
 drivers/net/wireless/ath/ath10k/qmi.h | 1 +
 2 files changed, 8 insertions(+)

diff --git a/drivers/net/wireless/ath/ath10k/qmi.c b/drivers/net/wireless/ath/ath10k/qmi.c
index 38e939f572a9e..50e28fa37e430 100644
--- a/drivers/net/wireless/ath/ath10k/qmi.c
+++ b/drivers/net/wireless/ath/ath10k/qmi.c
@@ -1040,6 +1040,10 @@ static void ath10k_qmi_driver_event_work(struct work_struct *work)
 		switch (event->type) {
 		case ATH10K_QMI_EVENT_SERVER_ARRIVE:
 			ath10k_qmi_event_server_arrive(qmi);
+			if (qmi->fake_msa_ready_indicator) {
+				ath10k_dbg(ar, ATH10K_DBG_QMI, "qmi HACK fake msa_ready indicator");
+				ath10k_qmi_event_msa_ready(qmi);
+			}
 			break;
 		case ATH10K_QMI_EVENT_SERVER_EXIT:
 			ath10k_qmi_event_server_exit(qmi);
@@ -1077,6 +1081,9 @@ int ath10k_qmi_init(struct ath10k *ar, u32 msa_size)
 	if (of_property_read_bool(dev->of_node, "qcom,msa-fixed-perm"))
 		qmi->msa_fixed_perm = true;
 
+	if (of_property_read_bool(dev->of_node, "qcom,no-msa-ready-indicator"))
+		qmi->fake_msa_ready_indicator = true;
+
 	ret = qmi_handle_init(&qmi->qmi_hdl,
 			      WLFW_BDF_DOWNLOAD_REQ_MSG_V01_MAX_MSG_LEN,
 			      &ath10k_qmi_ops, qmi_msg_handler);
diff --git a/drivers/net/wireless/ath/ath10k/qmi.h b/drivers/net/wireless/ath/ath10k/qmi.h
index 89464239fe96a..c68526aad8946 100644
--- a/drivers/net/wireless/ath/ath10k/qmi.h
+++ b/drivers/net/wireless/ath/ath10k/qmi.h
@@ -107,6 +107,7 @@ struct ath10k_qmi {
 	char fw_build_timestamp[MAX_TIMESTAMP_LEN + 1];
 	struct ath10k_qmi_cal_data cal_data[MAX_NUM_CAL_V01];
 	bool msa_fixed_perm;
+	bool fake_msa_ready_indicator;
 	enum ath10k_qmi_state state;
 };
 
-- 
2.34.1


  parent reply	other threads:[~2024-03-28 17:39 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-28 17:24 [PATCH v2 0/3] Work around missing MSA_READY indicator for msm8998 devices Marc Gonzalez
2024-03-28 17:36 ` [PATCH v2 1/3] dt-bindings: net: wireless: ath10k: add qcom,no-msa-ready-indicator prop Marc Gonzalez
2024-03-30 18:20   ` Krzysztof Kozlowski
2024-03-30 18:23     ` Krzysztof Kozlowski
2024-03-30 22:04       ` Marc Gonzalez
2024-04-03  6:44         ` Krzysztof Kozlowski
2024-03-28 17:38 ` Marc Gonzalez [this message]
2024-03-28 17:39 ` [PATCH v2 3/3] arm64: dts: qcom: msm8998: set qcom,no-msa-ready-indicator for wifi Marc Gonzalez
2024-03-30 18:25   ` Krzysztof Kozlowski
2024-04-02 14:34     ` Konrad Dybcio
2024-04-02 15:31       ` Marc Gonzalez
2024-04-02 15:55         ` Dmitry Baryshkov
2024-04-02 18:22           ` Jeff Johnson
2024-04-02 19:15             ` Dmitry Baryshkov
2024-04-02 18:25           ` Alexey Minnekhanov
2024-04-02 19:21             ` Dmitry Baryshkov
2024-04-02 23:32             ` Jeff Johnson
2024-04-03 13:05           ` Marc Gonzalez
2024-04-03 14:12             ` Dmitry Baryshkov
2024-04-03 18:16               ` Marc Gonzalez
2024-04-03 14:14             ` Krzysztof Kozlowski
2024-04-04 11:57           ` Kalle Valo
2024-04-04 12:30             ` Marc Gonzalez
2024-04-04 13:14               ` Dmitry Baryshkov
2024-04-04 15:28               ` Kalle Valo
2024-04-08 15:53                 ` Marc Gonzalez
2024-04-25  9:42                   ` Kalle Valo
2024-04-25 11:48                     ` Marc Gonzalez
2024-04-25 15:42                       ` Kalle Valo
2024-04-25 16:02                         ` Conor Dooley
2024-04-25 16:39                           ` Kalle Valo

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=45448d42-bc48-4b9e-adca-59a47e0674f5@freebox.fr \
    --to=mgonzalez@freebox.fr \
    --cc=andersson@kernel.org \
    --cc=ath10k@lists.infradead.org \
    --cc=avrac@freebox.fr \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jamipkettunen@gmail.com \
    --cc=jeffrey.l.hugo@gmail.com \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=kvalo@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=phhusson@freebox.fr \
    --cc=quic_jjohnson@quicinc.com \
    --cc=robh+dt@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).