Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1830119pxu; Tue, 24 Nov 2020 09:53:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJyb89FabjdZWncKDWSe6dwliViYymxU0MSJmTCMyNccuKPJeyTtqoC05Vn+4av/Txh7uLhq X-Received: by 2002:aa7:c713:: with SMTP id i19mr5072838edq.296.1606240390822; Tue, 24 Nov 2020 09:53:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606240390; cv=none; d=google.com; s=arc-20160816; b=sFwrYUMG3H9Us8TXHyZYubmgbnTdpFsYZHZwHDbDJ5DtdQm8FoWlM2LIKRZRz8zU5M u9DFtTn8Nf2T6v1gOnqH/M5la8bnarqnlvN7SwEHJJrAENdULPIwfNxBCNOV27nDVkBz PPqNBnDNtZ2R/GiJ7YJIBB8YXjd+V2tpk9A7nMkAI4o9EHhH+kmeZXbh4jSSFl7p3X43 SHyvwV0Kuc+tg4Dymn2UFdbjhJaxNSEEd7rCWB6jCVkbjyQkDS21jS22H/dKp358ks+d RjDfizXKAju+l5FWq1XhBfbQzhjRToEJ7JM9qXVi2ORhWzQiigfRibsODMCZZLGI2BHh 5a+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=CxnIfXHdix7GS8g6GFHW2wnM4FONLsoFnSqqsSh6GHc=; b=jkoTGmRjan0v/hGz67Z8qddehX2kdnTF45trTFCd6kcCPSALngCbam/C4NBIBB4gEN XcMbeSQiCR0NjERveKcxinXd4lfx0TuzFycEWdZ9HSdkl0CzFwHnTPA8/GkIUdx38dV1 0eqPnYKBeDisaYGSh96rVltn0qVnxndIvy6leSehroEO0D688GlMhWWIrdWV9hJayoyz whNbeuZ8UGpJ4HIhug93pBIvqUdD0Zv/vUoDp1v1+Eg8pftrMzXN5rPZC1r8usPlM6NV 6hdmI08I88ONxQL+6u8NN1I6SCmw8Rz9kfvfyIDESa1bqOMxdeGNjmaOnSGc2VACl0yZ 5ljA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CIAKGGvo; 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 g12si5258620edl.16.2020.11.24.09.52.34; Tue, 24 Nov 2020 09:53:10 -0800 (PST) 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=CIAKGGvo; 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 S2404061AbgKXRud (ORCPT + 99 others); Tue, 24 Nov 2020 12:50:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46278 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404056AbgKXRud (ORCPT ); Tue, 24 Nov 2020 12:50:33 -0500 Received: from mail-ot1-x342.google.com (mail-ot1-x342.google.com [IPv6:2607:f8b0:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2438C061A4D for ; Tue, 24 Nov 2020 09:50:32 -0800 (PST) Received: by mail-ot1-x342.google.com with SMTP id n11so20147770ota.2 for ; Tue, 24 Nov 2020 09:50:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=CxnIfXHdix7GS8g6GFHW2wnM4FONLsoFnSqqsSh6GHc=; b=CIAKGGvoM96bHX3qTKMq571WXskFxiweMjicyDzm9KHiiheeWHdpTze+EgY18uIFGx TXFUYqijSsUYaxZiQcM7TYGH3z11FfmFvQNv2y3S2sIjM3xz6X9Dv3/H71SwBzYqqehJ HzjZ8sV6azFHmOF4wsalz23pw0MbUDHblBMgZc1G4Mq3HT85EILFV28n0mWxd09wBj18 CBTshWNFG/8o2TuKB972+0ln4ohBt/IOIzkYBfbGgUBtgBnE0DZujjGJ3ECGLzzLonFi a9nA/bXdldgtzi2sb+U0j2TAu+sT8TMQJG0Vwb/FZiGMNGbCzD3f292aS5hLoEeyqePk yKYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=CxnIfXHdix7GS8g6GFHW2wnM4FONLsoFnSqqsSh6GHc=; b=HPcuYpkYQ0vNLtufBkJF93RA2Mh7eeKtH3DcQIUcn/ISNy8mAQ/iz45bbhYHliwOJC NixdujEyuPuHLhkNSQPjO/vd+n2YAG825v0EJB6x8cm537NXWiupv1um1Ec3MIocEgse JZPtH1gymK6rfJSvIvrj0IdgBhGFUVMGYuYy5fpKKjY/Qynr4aHuSTSquGgtH8HGeb80 9CeVr1NgIskMK5wTXN5Mj11P7HpfhO5Qv1Be3vorXhvVDXpCkgu40xs6+8W+PB0Wk+Pb l7DPcKeGmpzJJzdQHeO3S8JHDGOJfpGw9/05Iqu5lqoCQKe5L57l0by+a6cYj4FkWWl0 hkGQ== X-Gm-Message-State: AOAM53327Hxnl53uqRPNfutElIqHWfFrBf0lNpjSsYUCa6FmRDVyP+mL DfyyBef2Slhs+6yEpt1zKzFizA== X-Received: by 2002:a9d:3d06:: with SMTP id a6mr4103420otc.368.1606240232274; Tue, 24 Nov 2020 09:50:32 -0800 (PST) Received: from builder.lan (104-57-184-186.lightspeed.austtx.sbcglobal.net. [104.57.184.186]) by smtp.gmail.com with ESMTPSA id t126sm9735070oih.51.2020.11.24.09.50.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Nov 2020 09:50:31 -0800 (PST) Date: Tue, 24 Nov 2020 11:50:29 -0600 From: Bjorn Andersson To: Amit Pundir Cc: Kalle Valo , David S Miller , Jakub Kicinski , Jeffrey Hugo , John Stultz , Sumit Semwal , Konrad Dybcio , Joel S , ath10k@lists.infradead.org, linux-wireless@vger.kernel.org, netdev@vger.kernel.org, phone-devel@vger.kernel.org, lkml Subject: Re: [PATCH v2] ath10k: qmi: Skip host capability request for Xiaomi Poco F1 Message-ID: <20201124175029.GF185852@builder.lan> References: <1606127329-6942-1-git-send-email-amit.pundir@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1606127329-6942-1-git-send-email-amit.pundir@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On Mon 23 Nov 04:28 CST 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. > > 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. > > This workaround will be removed once we have a viable fix. > Thanks to postmarketOS guys for catching this. > > Signed-off-by: Amit Pundir > --- > We dropped this workaround last time in the favor of > a generic dts quirk to skip host cap check. But that > is under under discussion for a while now, > https://lkml.org/lkml/2020/9/25/1119, so resending > this short term workaround for the time being. > I still want the quirk, because we have this on other machines as well. > v2: ath10k-check complained about a too long line last > time, so moved the comment to a new line. > > drivers/net/wireless/ath/ath10k/qmi.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/wireless/ath/ath10k/qmi.c b/drivers/net/wireless/ath/ath10k/qmi.c > index ae6b1f402adf..1c58b0ff1d29 100644 > --- a/drivers/net/wireless/ath/ath10k/qmi.c > +++ b/drivers/net/wireless/ath/ath10k/qmi.c > @@ -653,7 +653,9 @@ 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 && > + /* Xiaomi Poco F1 workaround */ If we go with a temporary approach this comment should describe why this is here. (And it probably shouldn't be in the middle of the expression list in the conditional. Regards, Bjorn > + !of_machine_is_compatible("xiaomi,beryllium")) { > ath10k_err(ar, "host capability request rejected: %d\n", resp.resp.error); > ret = -EINVAL; > goto out; > -- > 2.7.4 >