From a09a63360b29a7fd673192bfc1d2bd6ace8fd15a Mon Sep 17 00:00:00 2001 From: Bjorn Andersson Date: Wed, 13 Nov 2019 15:35:58 -0800 Subject: [PATCH] UPSTREAM: ath10k: qmi: Sleep for a while before assigning MSA memory commit b70b3a36ec33a2c8d3292f3b33fe2047a8f57b9a upstream. Unless we sleep for a while before transitioning the MSA memory to WLAN the MPSS.AT.4.0.c2-01184-SDM845_GEN_PACK-1 firmware triggers a security violation fairly reliably. Unforutnately recovering from this failure always results in the entire system freezing. Signed-off-by: Bjorn Andersson Signed-off-by: Kalle Valo (cherry picked from commit b70b3a36ec33a2c8d3292f3b33fe2047a8f57b9a) Signed-off-by: Amit Pundir Signed-off-by: John Stultz Change-Id: Ie44e86d404f1897b7cc349a03972178374fef89c --- drivers/net/wireless/ath/ath10k/qmi.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/wireless/ath/ath10k/qmi.c b/drivers/net/wireless/ath/ath10k/qmi.c index 545ac1f06997..86fde2269c90 100644 --- a/drivers/net/wireless/ath/ath10k/qmi.c +++ b/drivers/net/wireless/ath/ath10k/qmi.c @@ -746,6 +746,13 @@ static void ath10k_qmi_event_server_arrive(struct ath10k_qmi *qmi) if (ret) return; + /* + * HACK: sleep for a while inbetween receiving the msa info response + * and the XPU update to prevent SDM845 from crashing due to a security + * violation, when running MPSS.AT.4.0.c2-01184-SDM845_GEN_PACK-1. + */ + msleep(20); + ret = ath10k_qmi_setup_msa_permissions(qmi); if (ret) return;