Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1193660pxk; Fri, 25 Sep 2020 08:29:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw9RMFAh5yKCLehysn1J/hNDrmH3jBBtPaM0wZsBIu3ypjAZTIP5mHfO9t+/sfBZqBYkzYc X-Received: by 2002:a17:906:fccb:: with SMTP id qx11mr3314678ejb.429.1601047753011; Fri, 25 Sep 2020 08:29:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601047753; cv=none; d=google.com; s=arc-20160816; b=wtWYw3HMRKbWj/PJ15DxEwKPlGm0a9jUz4b9bl78g6ZO2LfrxQ0tX9bncLWqqfuMa3 yBSjvAa+5AolcB9WCVBXBuRxw1uCGyYnBh1ZkoSu1VeT3XqTD4is40zuWPq0kLIMCm3V o4lQH8hLMmg0h2J0+uiikTl1EQPFRkwQyxJcEtRyrpJOP/Anm3CmdrcdoA90+sor5AuH IxkKnoZAcyag7pqgopkIGoDGfIotCAqmVbm4oqpk1flDKJ4ZPUiVamz/5Z/qHDhSfcNF OpWySMZPveRUw9KocBWQMKE8T1LASeXeZDAhRm4vZ0j8j1O2YVnQG9a1zZ/MQmGpAONv TndA== 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=+6Gvod8Bmcfdc8dmCT/NbNCi24OBdt2HEY33KRNsSb0=; b=jnld03U2Kc0nX0dsWZ++v5UhpkD8XKQpcxTKk6x4cP5CE13QUCEc3PH1lGkmVwrbg9 GBObu9qKOW6Anvsbq+TZYegWndr8UyAJCMN+K4ARdaoU4w94KjWZGqijOHyRf3cxqJ7f eC1Gui+YJzHVa7FkqNatO5JY7TlENAAny4jdiZgqkMkO+hjNUpMYraX2OL+wMF35R4Jz Q25xz6CfmzrmNV2LZ8FtlE6iHOkBi9N7f29RLzm91Q7LUYgyJK3GFZwZKCYO5WlnlpmZ D0aVEi6Tn2+lNUov+5FK1o3MpCFvlJVR7+YNAu08tHoTvfhpvnbSO23xb2V8FK6Ic44o cyeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=LtsiSvd4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 dn20si2205532ejc.342.2020.09.25.08.28.49; Fri, 25 Sep 2020 08:29:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=LtsiSvd4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 S1729390AbgIYP1n (ORCPT + 99 others); Fri, 25 Sep 2020 11:27:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728801AbgIYP1m (ORCPT ); Fri, 25 Sep 2020 11:27:42 -0400 Received: from mail-oi1-x243.google.com (mail-oi1-x243.google.com [IPv6:2607:f8b0:4864:20::243]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 95EE6C0613CE for ; Fri, 25 Sep 2020 08:27:42 -0700 (PDT) Received: by mail-oi1-x243.google.com with SMTP id n2so3198648oij.1 for ; Fri, 25 Sep 2020 08:27:42 -0700 (PDT) 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=+6Gvod8Bmcfdc8dmCT/NbNCi24OBdt2HEY33KRNsSb0=; b=LtsiSvd40J24vUdcrdY9gBNxAHpcZ6Zb9yoKXmnIQUoMF4WFdLxs8QsBRS6u6KtiFc fzpoKREQyPnB8h7hwbATU0WdVwl3mwJAaDfn7iWB6VRU1ab1n0KNRgFxIvsQqRnAc1ES fi7gxOZ5X4HZAJd0wVSZGewSySpGnwMukduIdm3f3m6LODh1uSkPWiPknp+mCbnHXsxs S27PzgFBAn0WAkNdIF//5YWEsUDkMqY4Tu+aTB3YieZrI1dUuuRdIqfRm6uj3n4TPhf8 wbLk8SYKo4dio2aIcPcE6sAYRFnVYTqzAOGvnrjnikJ4FhiGP0MnyDRZp2uToWLABKF2 dlTw== 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=+6Gvod8Bmcfdc8dmCT/NbNCi24OBdt2HEY33KRNsSb0=; b=imEohxJCM7mPgFX2NZfHaG4qJh/G6IIhV9kV2hC0NXtLh0KfLUhFr8FQXAlvS/ZeWt GQ3GtzbDUlEutZfRg3tjm6xpCv2G7YufnwKw+JnE4mU4IoMzcMXG8D5nzfdoDpY6nlUa 6LGiLhI3U1ndLrc00a9LntLpG+n5ttjHF5ASoYBufgD2eELo5MsCzVepcPzHJhrlTpQP EljQX6DXDWnEyT3ILYrBBys6fHvqjKWF2Xd/nRFJCE+htGyr3Gbnj1nPKmztVlh+45G5 wUnQF7ZDcNTZjbwRmFOJWRZUXMjJPY829q7Qnyph7ngA8MII95JAKVz1rYq+7lKA8zs5 VkbA== X-Gm-Message-State: AOAM533CXSybYUTlN4wjD2B+u+lR0dea1sn02Xq+tQvJTvDYOLAq9yZE jebQ9GN+z1fAnMihcG754Eg9AQ== X-Received: by 2002:aca:dd42:: with SMTP id u63mr531139oig.135.1601047661927; Fri, 25 Sep 2020 08:27:41 -0700 (PDT) Received: from yoga (99-135-181-32.lightspeed.austtx.sbcglobal.net. [99.135.181.32]) by smtp.gmail.com with ESMTPSA id y24sm764388ooq.38.2020.09.25.08.27.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Sep 2020 08:27:41 -0700 (PDT) Date: Fri, 25 Sep 2020 10:27:39 -0500 From: Bjorn Andersson To: Kalle Valo Cc: Amit Pundir , David S Miller , Jakub Kicinski , Jeffrey Hugo , netdev@vger.kernel.org, linux-wireless@vger.kernel.org, Konrad Dybcio , ath10k@lists.infradead.org, lkml , John Stultz , Sumit Semwal Subject: Re: [PATCH] ath10k: qmi: Skip host capability request for Xiaomi Poco F1 Message-ID: <20200925152739.GE2510@yoga> References: <1600328501-8832-1-git-send-email-amit.pundir@linaro.org> <87d02bnnll.fsf@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87d02bnnll.fsf@codeaurora.org> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 24 Sep 11:31 CDT 2020, Kalle Valo wrote: > Amit Pundir writes: > > > 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 > > Bjorn, is this ok to take? > As I wrote in the answer to Amit I think we should introduce a generic quirk to skip host_cap instead. So if you pick this up (which is an ok short term workaround) I think we should revert it once we have a generic mechanism. Regards, Bjorn > > --- 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); > > ath10k-check complained about a too long line, so in the pending branch > I moved the comment before the if statement. > > -- > https://patchwork.kernel.org/project/linux-wireless/list/ > > https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches