From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B2A9CC4363D for ; Fri, 25 Sep 2020 15:27:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 643F1235F9 for ; Fri, 25 Sep 2020 15:27:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="LtsiSvd4" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729395AbgIYP1n (ORCPT ); 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-Google-Smtp-Source: ABdhPJxPC5MyC8S4bjpg1guvEbH+1/PR/di2bgdC6u6i0LcfpuOGCns4aOm9QrUXbpQfAG0lPAd0mw== 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