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 A2F1BC4727E for ; Fri, 25 Sep 2020 18:33:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 646C8208B6 for ; Fri, 25 Sep 2020 18:33:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="IHDkMpVx" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729759AbgIYSdN (ORCPT ); Fri, 25 Sep 2020 14:33:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729964AbgIYSdL (ORCPT ); Fri, 25 Sep 2020 14:33:11 -0400 Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 828F3C0613D4 for ; Fri, 25 Sep 2020 11:33:11 -0700 (PDT) Received: by mail-wm1-x341.google.com with SMTP id e17so4054153wme.0 for ; Fri, 25 Sep 2020 11:33:11 -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=6wr5b8CFYdqzzo6Xedl1l6pleUPcSYgGVWdKtDphUtU=; b=IHDkMpVxwv/dF8C95VxnNNlR2HFW37aiZNZWFsIwEJEURZGGBHDbEuaG5yMtGs7Sce ZKGVnSDDFZaRvuTicpWkk1reDSLon0PS7d+uwgJuIcfROO482TDn2DixCWyPFCHN/4PX munK4n6yIq0pv7+ouU4T87VyALlYwRm319Ucu3a+XT/bbXEYiG6eJaGHi5BCbHkE5eWy fAwZiF2ecRHcQAJopNydaYIFLByoRdZSMIvmBj1kWYofEmArWiPbhuKsmuLFwZm9GIFp ZGRsbSkTfS1igKgJRB9c71NM4mQ2PO/r994MgJmTUzJCJFFgIF6BHPmzvA7bdlI6jvTY 82Cw== 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=6wr5b8CFYdqzzo6Xedl1l6pleUPcSYgGVWdKtDphUtU=; b=bHBPoOSKOOgLjky6U0Dqvlv4N/TRoR+JW3QjVjanSL2P3WcMEbEeJgmfFS1V2yJ/Iy iZxpyH6EU+xOlXp83pcX//g/PNcc48khUuOblyNrwi34s5DV905OuxsfRnSXde9Bs28r eX/ZWR9Cw/EY9NnGccFkCOiR7aUFU9vbnsOT0/KRQnYbSnsh27AhXsi54Ix8O08X3L8J ddomcuaMSChLqoti6YiYNx/Vjjr6ztPsGcp+R9nbUXROW7O/jJI0DeXYIYk2v+Ys5GVS oA5FvzlGU23KutyyLoItdx0LGaH8sgEtqGbT6XoeX7teuMZlNdXZHY7pMLIdkr7K/y7Q +kqg== X-Gm-Message-State: AOAM531SsKD/Za8TO7+irV20u3qW0lt3UMdARdMcxh/P3wOpcDJgRfyi /r+sUP75b9UJKtsl6hjlcP5EzMKYnlPjKnRC3FPvnQ== X-Google-Smtp-Source: ABdhPJw8c61BhX0/8pflJJeMDcnBp4MI+ROLCChhpS0j+CxQAmOUZ8qpXphp1hlcL62YpZDV8sWD/MxOihr2Pj6GLyw= X-Received: by 2002:a7b:c38f:: with SMTP id s15mr4603352wmj.16.1601058790123; Fri, 25 Sep 2020 11:33:10 -0700 (PDT) MIME-Version: 1.0 References: <1600328501-8832-1-git-send-email-amit.pundir@linaro.org> <87d02bnnll.fsf@codeaurora.org> <20200925152739.GE2510@yoga> In-Reply-To: <20200925152739.GE2510@yoga> From: Amit Pundir Date: Sat, 26 Sep 2020 00:02:33 +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 , netdev@vger.kernel.org, linux-wireless@vger.kernel.org, Konrad Dybcio , ath10k , lkml , John Stultz , Sumit Semwal Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Fri, 25 Sep 2020 at 20:57, Bjorn Andersson wrote: > > 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. Hi Bjorn, just sent out a generic skip quirk for review. Regards, Amit Pundir > > 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