Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3033645pxk; Mon, 21 Sep 2020 03:39:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz/cp8k95hn8bxK02JVSO3LjMUxDqWwihug4NyOqqjrqcGcpAWammWPKza26QPfqYIUS/nT X-Received: by 2002:aa7:dd16:: with SMTP id i22mr52321480edv.335.1600684794868; Mon, 21 Sep 2020 03:39:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600684794; cv=none; d=google.com; s=arc-20160816; b=KrE/W28zmzFY14bLOZS2U8f0zyT7X8v9dngy9f7xAJ1kTsWLdhUQkKnN7bt8r4GJen iYDSNIjTrif8hghtixohsEiFGmb3seZw/LCviPeK4XTW6PpYiwtBGdaBX1r/eRGbwnwg GMgrQ98/CDkS8Sm07uizbCSFVedDp/fFg7WC9leZiM5uppSb4lN8zmzHyxcxwohgvbB7 d9m7ynKYsYqu9RoxEUqlTlJZW62d1l9RSzhlFFK2OPn7YCiKJBSwcqSL/+2jNh0k2lmz eX543qzXjB2ivVBhbmM5hVTo2x5WcaQJETrdHQyWK93nMqKfUY7QB/2oe7ByO5a2KqFs mtqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=815PefS5zvLdQ7D87NKa1eSJ5I4DKxCbFZlXVdIOiew=; b=M+3mIwIrfo/8a9amxz7JeECuDfxkvIVJBsKWzRpMFoAOGlEbPsZ1S+sYYweoaZJJoH b6nUuXTj64HnKlxAwhHq9o+qPgsBUg8d8aVzWZFSYoRfjgutU4VeNmp20xC+ZOsWWnOl yTnRhPrLK2jVXWOUauid2QRanr6phjNFZ5LwWNvMfYbOEqnCBhMzirfdCggdkTu01S6W 827wPkM5uyZ6KnZM8B4Z5/NzdxOPKLqZOsnMLjB6vmgdPi9Yzo4+pvvPGbHVVNsz8UCz V1KVLiTZvZWttpyehmC2iLlwFdC/qmTOt72QqnJf7XaCQtVlvwktLB8wBV2kjdELTDce a0nQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eQiynjUN; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c3si7475232edr.295.2020.09.21.03.39.21; Mon, 21 Sep 2020 03:39:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eQiynjUN; spf=pass (google.com: domain of linux-wireless-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-wireless-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726589AbgIUKjD (ORCPT + 99 others); Mon, 21 Sep 2020 06:39:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726353AbgIUKjC (ORCPT ); Mon, 21 Sep 2020 06:39:02 -0400 Received: from mail-wm1-x343.google.com (mail-wm1-x343.google.com [IPv6:2a00:1450:4864:20::343]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42F0FC061755 for ; Mon, 21 Sep 2020 03:39:02 -0700 (PDT) Received: by mail-wm1-x343.google.com with SMTP id l9so12084190wme.3 for ; Mon, 21 Sep 2020 03:39:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=815PefS5zvLdQ7D87NKa1eSJ5I4DKxCbFZlXVdIOiew=; b=eQiynjUNa7H0ULRmDBn/a9gnNuhDfWsTWCJzx5pS9vux/WaRo1DEPXu26YMdh4Cx3a CWkOoeocK+6Py8imhk3uoyCHsLib5VjbmE22WZzyrcsJm8/6hgIkHcnGHxRluFy0BdCk GJhz/lbWKod0B9cLnO9CjSWFyVmfV26bD5etc0LWY+YlafqDIkFzRvEslDZzZyWiAkom npHe2tM5x88sTK/MT9C33JCLxtIEOFm/6fCcXemsxaDdI7oqbbMEV60xzQC4z1GUMdjb Pb1nYP94BTsXLGvBaUiEfkU0op8Am1yc4MpJk/+Gfxp5ZgNI800vV0EYZ4aCjoEGSVar vp0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=815PefS5zvLdQ7D87NKa1eSJ5I4DKxCbFZlXVdIOiew=; b=UVqHZTF0g7+aBwyaHPNtlQlOttaeGsqG7m9vmqSz6h27O9Mv6XTJrEG1YJWPk5oXh3 e1fzarLyi+pY0ia3eXawGHspbhFedLuVNcePSa6qcEdz0/jWAHB60n29aUKZEHluAizp 0Kc6YP0s/okP4EdOaMBYDXlM2aiwzztN9zTbDLJ6vYbR/MO/c3DSQeht4k+QRSJNGw8R fviJAdhj0BdeYu9UHfz9CYlwTaogKS+4txeaW3oIZUV8W24bMUDFcQTMtAmfno8R65Dd p+t/cgE0+BADAew7O8jDp8yh/wihB1bSJwiVdZ6xkJ/reKDRH5ywt7XDezoCaJ0qOoNm sapQ== X-Gm-Message-State: AOAM532FQRYhotsXjZmk3DAbVuq/kYE2E4YjpPbznedQ1y5U+8Bacs2d lV34bggcKEL6uGyf7uwUyIYYIPcuuMXw/8Eil0v8Ow== X-Received: by 2002:a7b:c0c5:: with SMTP id s5mr29004793wmh.152.1600684740821; Mon, 21 Sep 2020 03:39:00 -0700 (PDT) MIME-Version: 1.0 References: <1600328501-8832-1-git-send-email-amit.pundir@linaro.org> <20200917160513.GO1893@yoga> In-Reply-To: <20200917160513.GO1893@yoga> From: Amit Pundir Date: Mon, 21 Sep 2020 16:08:24 +0530 Message-ID: Subject: Re: [PATCH] ath10k: qmi: Skip host capability request for Xiaomi Poco F1 To: Bjorn Andersson Cc: Kalle Valo , David S Miller , Jakub Kicinski , Jeffrey Hugo , John Stultz , Sumit Semwal , Konrad Dybcio , ath10k , linux-wireless@vger.kernel.org, netdev@vger.kernel.org, lkml Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Thu, 17 Sep 2020 at 21:35, Bjorn Andersson wrote: > > On Thu 17 Sep 02:41 CDT 2020, Amit Pundir wrote: > > > Workaround to get WiFi working on Xiaomi Poco F1 (sdm845) > > phone. We get a non-fatal QMI_ERR_MALFORMED_MSG_V01 error > > message in ath10k_qmi_host_cap_send_sync(), but we can still > > bring up WiFi services successfully on AOSP if we ignore it. > > > > We suspect either the host cap is not implemented or there > > may be firmware specific issues. Firmware version is > > QC_IMAGE_VERSION_STRING=WLAN.HL.2.0.c3-00257-QCAHLSWMTPLZ-1 > > > > qcom,snoc-host-cap-8bit-quirk didn't help. If I use this > > quirk, then the host capability request does get accepted, > > but we run into fatal "msa info req rejected" error and > > WiFi interface doesn't come up. > > > > What happens if you skip sending the host-cap message? I had one > firmware version for which I implemented a > "qcom,snoc-host-cap-skip-quirk". > > But testing showed that the link was pretty unusable - pushing any real > amount of data would cause it to silently stop working - and I realized > that I could use the linux-firmware wlanmdsp.mbn instead, which works > great on all my devices... I skipped the ath10k_qmi_host_cap_send_sync block altogether (if that is what you meant by qcom,snoc-host-cap-skip-quirk) and so far did not run into any issues with youtube auto-playback loop (3+ hours and counting). Does that count as a valid use case? Otherwise let me know how could I reproduce a reasonable test setup? > > > Attempts are being made to debug the failure reasons but no > > luck so far. Hence this device specific workaround instead > > of checking for QMI_ERR_MALFORMED_MSG_V01 error message. > > Tried ath10k/WCN3990/hw1.0/wlanmdsp.mbn from the upstream > > linux-firmware project but it didn't help and neither did > > building board-2.bin file from stock bdwlan* files. > > > > "Didn't work" as in the wlanmdsp.mbn from linux-firmware failed to load > or some laer problem? While using the wlanmdsp.mbn from linux-firmware, I run into the following crash 4 times before tqftpserv service gets killed eventually: [ 46.504502] qcom-q6v5-mss 4080000.remoteproc: fatal error received: dog_virtual_root.c:89:User-PD grace timer expired for wlan_process (ASID: 1) [ 46.504527] remoteproc remoteproc0: crash detected in 4080000.remoteproc: type fatal error [ 46.504558] remoteproc remoteproc0: handling crash #1 in 4080000.remoteproc [ 46.504563] remoteproc remoteproc0: recovering 4080000.remoteproc [ 56.542400] 4080000.remoteproc:glink-edge: intent request timed out [ 56.644617] qcom-q6v5-mss 4080000.remoteproc: port failed halt [ 56.652321] remoteproc remoteproc0: stopped remote processor 4080000.remoteproc [ 59.017963] qcom-q6v5-mss 4080000.remoteproc: MBA booted without debug policy, loading mpss [ 61.514552] remoteproc remoteproc0: remote processor 4080000.remoteproc is now up <.... snip ....> [ 214.161946] failed to send del client cmd [ 214.161952] failed while handling packet from 1:16689 [ 214.185826] failed to send del client cmd [ 214.185832] failed while handling packet from 1:16688 [ 214.201951] failed to send del client cmd <.... snip ....> [ 219.682148] failed to send del client cmd [ 219.682154] failed while handling packet from 1:16394 [ 219.714707] init: Service 'tqftpserv' (pid 321) received signal 6 oneshot service took 215.852005 seconds in background [ 219.714754] init: Sending signal 9 to service 'tqftpserv' (pid 321) process group... Regards, Amit Pundir > > Regards, > Bjorn > > > This workaround will be removed once we have a viable fix. > > Thanks to postmarketOS guys for catching this. > > > > Signed-off-by: Amit Pundir > > --- > > Device-tree for Xiaomi Poco F1(Beryllium) got merged in > > qcom/arm64-for-5.10 last week > > https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux.git/commit/?id=77809cf74a8c > > > > drivers/net/wireless/ath/ath10k/qmi.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/net/wireless/ath/ath10k/qmi.c b/drivers/net/wireless/ath/ath10k/qmi.c > > index 0dee1353d395..37c5350eb8b1 100644 > > --- a/drivers/net/wireless/ath/ath10k/qmi.c > > +++ b/drivers/net/wireless/ath/ath10k/qmi.c > > @@ -651,7 +651,8 @@ static int ath10k_qmi_host_cap_send_sync(struct ath10k_qmi *qmi) > > > > /* older FW didn't support this request, which is not fatal */ > > if (resp.resp.result != QMI_RESULT_SUCCESS_V01 && > > - resp.resp.error != QMI_ERR_NOT_SUPPORTED_V01) { > > + resp.resp.error != QMI_ERR_NOT_SUPPORTED_V01 && > > + !of_machine_is_compatible("xiaomi,beryllium")) { /* Xiaomi Poco F1 workaround */ > > ath10k_err(ar, "host capability request rejected: %d\n", resp.resp.error); > > ret = -EINVAL; > > goto out; > > -- > > 2.7.4 > >