Commit 6d67d180 authored by Marc Gonzalez's avatar Marc Gonzalez Committed by Kalle Valo

wifi: ath10k: do not always wait for MSA_READY indicator

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: default avatarMarc Gonzalez <mgonzalez@freebox.fr>
Reviewed-by: default avatarBjorn Andersson <quic_bjorande@quicinc.com>
Acked-by: default avatarJeff Johnson <quic_jjohnson@quicinc.com>
Signed-off-by: default avatarKalle Valo <quic_kvalo@quicinc.com>
Link: https://msgid.link/23540303-5816-45d5-a1af-5f09d645a73b@freebox.fr
parent 71b6e321
...@@ -1040,6 +1040,10 @@ static void ath10k_qmi_driver_event_work(struct work_struct *work) ...@@ -1040,6 +1040,10 @@ static void ath10k_qmi_driver_event_work(struct work_struct *work)
switch (event->type) { switch (event->type) {
case ATH10K_QMI_EVENT_SERVER_ARRIVE: case ATH10K_QMI_EVENT_SERVER_ARRIVE:
ath10k_qmi_event_server_arrive(qmi); ath10k_qmi_event_server_arrive(qmi);
if (qmi->no_msa_ready_indicator) {
ath10k_info(ar, "qmi not waiting for msa_ready indicator");
ath10k_qmi_event_msa_ready(qmi);
}
break; break;
case ATH10K_QMI_EVENT_SERVER_EXIT: case ATH10K_QMI_EVENT_SERVER_EXIT:
ath10k_qmi_event_server_exit(qmi); ath10k_qmi_event_server_exit(qmi);
...@@ -1048,6 +1052,10 @@ static void ath10k_qmi_driver_event_work(struct work_struct *work) ...@@ -1048,6 +1052,10 @@ static void ath10k_qmi_driver_event_work(struct work_struct *work)
ath10k_qmi_event_fw_ready_ind(qmi); ath10k_qmi_event_fw_ready_ind(qmi);
break; break;
case ATH10K_QMI_EVENT_MSA_READY_IND: case ATH10K_QMI_EVENT_MSA_READY_IND:
if (qmi->no_msa_ready_indicator) {
ath10k_warn(ar, "qmi unexpected msa_ready indicator");
break;
}
ath10k_qmi_event_msa_ready(qmi); ath10k_qmi_event_msa_ready(qmi);
break; break;
default: default:
...@@ -1077,6 +1085,9 @@ int ath10k_qmi_init(struct ath10k *ar, u32 msa_size) ...@@ -1077,6 +1085,9 @@ int ath10k_qmi_init(struct ath10k *ar, u32 msa_size)
if (of_property_read_bool(dev->of_node, "qcom,msa-fixed-perm")) if (of_property_read_bool(dev->of_node, "qcom,msa-fixed-perm"))
qmi->msa_fixed_perm = true; qmi->msa_fixed_perm = true;
if (of_property_read_bool(dev->of_node, "qcom,no-msa-ready-indicator"))
qmi->no_msa_ready_indicator = true;
ret = qmi_handle_init(&qmi->qmi_hdl, ret = qmi_handle_init(&qmi->qmi_hdl,
WLFW_BDF_DOWNLOAD_REQ_MSG_V01_MAX_MSG_LEN, WLFW_BDF_DOWNLOAD_REQ_MSG_V01_MAX_MSG_LEN,
&ath10k_qmi_ops, qmi_msg_handler); &ath10k_qmi_ops, qmi_msg_handler);
......
...@@ -107,6 +107,7 @@ struct ath10k_qmi { ...@@ -107,6 +107,7 @@ struct ath10k_qmi {
char fw_build_timestamp[MAX_TIMESTAMP_LEN + 1]; char fw_build_timestamp[MAX_TIMESTAMP_LEN + 1];
struct ath10k_qmi_cal_data cal_data[MAX_NUM_CAL_V01]; struct ath10k_qmi_cal_data cal_data[MAX_NUM_CAL_V01];
bool msa_fixed_perm; bool msa_fixed_perm;
bool no_msa_ready_indicator;
enum ath10k_qmi_state state; enum ath10k_qmi_state state;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment