Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp364976pxb; Thu, 23 Sep 2021 01:35:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZQGSQsXB+aqLUzcJ6A7Utymk95p6mtSzqVxKIetf0ew0pgYEphfrtEIgcwrWRlLYrnndS X-Received: by 2002:a05:6e02:b2b:: with SMTP id e11mr910268ilu.55.1632386138721; Thu, 23 Sep 2021 01:35:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632386138; cv=none; d=google.com; s=arc-20160816; b=h0LLlrNIwMrzBaimx/KDuOp+3W2lkxlyrGW29b0dGA38tZmGmcDIXWR+slN2CTovXs Y/s886EgsyrKkmrWCwdXkrU7lU1KVRti5lMCRmEWW7tRFzr8xGhUaalUN/ppN96Sqj9H dU2ZgB5Xo9RxdxmUKlGWv7Yw6d53d11HI4gVIr8JRqsy/gcyYDr7zqXX9m10D06YWi8/ H7FRzEWPOXZqUE0N82eEfQljpWkGE1E6W68pwxO2Vndv0zmu7mVwhafhWBuuB+DV7EV8 Bua5nyMVk6PMvaYO2UWSxEnoj/HIv6/Bj6nGhbHrkZAhNqoOSU4kjnUk4AtRuvBiRFEb 0nhA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:references:in-reply-to :subject:cc:to:from:date:content-transfer-encoding:mime-version :sender:dkim-signature; bh=RnAXDb/cdy2vNbulmV0mjCa/sumMUiZffdwxvVj6GIc=; b=bKrNbMcTDEs+7yWCY1FZ9yPt4VA2l+V7R2UZt4U4+OxiBYaIjgxvDhkLp+HtW+5rHJ giWPZrbvew/Ovk+pnU1V7puPR8fYv8h6kRIMgi+omw2of7Mz11JFRc/kZUmnjawJHyR2 RGWfgX1i1mvszjmKTPvaGKhGSMhzb/p1SOMWqea+55ubf3q6uFXiFhfXGIv9zGjv5BzV 4pDEm3M0rhsg8LKc9qCsDpLUPFtJhMZ6FlkftT1CJYj2hq461UKEAr5ANuqegJLAFcPv jieTWRvECvYTV7f9gb1ZLCFkmFrSzigkFDWtU9omSMbMh6ZM8Tg50x9piE8F7X5VJTPA Un7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mg.codeaurora.org header.s=smtp header.b=lM4asBQr; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q10si6031338ilu.41.2021.09.23.01.35.28; Thu, 23 Sep 2021 01:35:38 -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=@mg.codeaurora.org header.s=smtp header.b=lM4asBQr; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239889AbhIWIgW (ORCPT + 80 others); Thu, 23 Sep 2021 04:36:22 -0400 Received: from so254-9.mailgun.net ([198.61.254.9]:54877 "EHLO so254-9.mailgun.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239861AbhIWIgV (ORCPT ); Thu, 23 Sep 2021 04:36:21 -0400 DKIM-Signature: a=rsa-sha256; v=1; c=relaxed/relaxed; d=mg.codeaurora.org; q=dns/txt; s=smtp; t=1632386090; h=Message-ID: References: In-Reply-To: Subject: Cc: To: From: Date: Content-Transfer-Encoding: Content-Type: MIME-Version: Sender; bh=RnAXDb/cdy2vNbulmV0mjCa/sumMUiZffdwxvVj6GIc=; b=lM4asBQr1SOnpgcq2Tzf1ZymJ+uFN+XVuJN3LdWbVKPgJau/owizezKny7eXsq2S8/lBJU2f V8YyArwaP94mFsya8j/1AMQPX8UN+OAzj/gn2zoayJOVOqJXIx1XgFLH8S45tpi1XL0yLDrs bnTvV6030faWEs5CXWP0mdsUUg0= X-Mailgun-Sending-Ip: 198.61.254.9 X-Mailgun-Sid: WyI3YTAwOSIsICJsaW51eC13aXJlbGVzc0B2Z2VyLmtlcm5lbC5vcmciLCAiYmU5ZTRhIl0= Received: from smtp.codeaurora.org (ec2-35-166-182-171.us-west-2.compute.amazonaws.com [35.166.182.171]) by smtp-out-n05.prod.us-east-1.postgun.com with SMTP id 614c3c24ec62f57c9ad4d9d6 (version=TLS1.2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256); Thu, 23 Sep 2021 08:34:44 GMT Sender: cjhuang=codeaurora.org@mg.codeaurora.org Received: by smtp.codeaurora.org (Postfix, from userid 1001) id C962BC43460; Thu, 23 Sep 2021 08:34:43 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-caf-mail-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=ALL_TRUSTED,BAYES_00, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.codeaurora.org (localhost.localdomain [127.0.0.1]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: cjhuang) by smtp.codeaurora.org (Postfix) with ESMTPSA id 10B7EC4338F; Thu, 23 Sep 2021 08:34:43 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Date: Thu, 23 Sep 2021 16:34:43 +0800 From: Carl Huang To: Manivannan Sadhasivam Cc: Kalle Valo , Loic Poulain , ath11k@lists.infradead.org, linux-arm-msm , linux-wireless@vger.kernel.org, regressions@lists.linux.dev Subject: Re: [regression] mhi: ath11k resume fails on some devices In-Reply-To: <20210916171927.GB9027@thinkpad> References: <871r5p0x2u.fsf@codeaurora.org> <20210916111218.GA12918@thinkpad> <20210916163529.GA9027@thinkpad> <87k0jgxyjp.fsf@codeaurora.org> <20210916171927.GB9027@thinkpad> Message-ID: X-Sender: cjhuang@codeaurora.org User-Agent: Roundcube Webmail/1.3.9 Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org On 2021-09-17 01:19, Manivannan Sadhasivam wrote: > On Thu, Sep 16, 2021 at 07:42:02PM +0300, Kalle Valo wrote: >> Manivannan Sadhasivam writes: >> >> > On Thu, Sep 16, 2021 at 01:18:22PM +0200, Loic Poulain wrote: >> >> Le jeu. 16 sept. 2021 à 13:12, Manivannan Sadhasivam < >> >> manivannan.sadhasivam@linaro.org> a écrit : >> >> >> > >> > [...] >> > >> >> > If things seems to work fine without that patch, then it implies that >> >> > setting M0 >> >> > state works during resume. I think we should just revert that patch. >> >> > >> >> > Loic, did that patch fix any issue for you or it was a cosmetic fix only? >> >> >> >> >> >> It fixes sdx modem resuming issue, without that we don’t know modem needs >> >> to be reinitialized. >> >> >> > >> > Okay. Then in that case, the recovery mechanism has to be added to the ath11k >> > MHI controller. >> >> What does that mean in practise, do you have any pointers or examples? >> I >> have no clue what you are proposing :) >> > > Take a look at the mhi_pci_recovery_work() function below: > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/bus/mhi/pci_generic.c#n610 > > You need to implement something similar that basically powers up the > MHI > endpoint (QCA6390) in case pm_resume() fails. At minimum, you need to > call > below functions: > > # Check if the device is powered on. If yes, then power it down to > bring it back > mhi_power_down() > mhi_unprepare_after_power_down() > > # Power up the device > mhi_prepare_for_power_up() > mhi_sync_power_up() > > This implies that the WLAN device has been powered off during suspend, > so the > resume fails and we are bringing the device back to working state. > This is fine for platform which doesn't provide power supply during suspend. But NUC has power supply in suspend state. QCA6390 on NUC works after just reverting this commit also proves NUC has power supply in suspend state. The reason is MHI-STATUS register can't be read somehow in M3 state on NUC. Does the MHI spec state that MHI-STATUS register can be read in M3 state? >> > If that's too much of work for Kalle, then I'll look into it. But I might get >> > time only after Plumbers. >> >> I'm busy, as always, so not sure when I'm able to do it either. I >> think >> we should seriously consider reverting 020d3b26c07a and adding it back >> after ath11k is able to handle this new situation. >> > > Since Loic said that reverting would cause his modem (SDX device) to > fail during > resume, this is not possible. > > Thanks, > Mani > >> -- >> https://patchwork.kernel.org/project/linux-wireless/list/ >> >> https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches