Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1417595pxb; Fri, 24 Sep 2021 04:12:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz3fRzLqnFGg1etrqKjt+6/3PJjjPVh/GYOTLzad4vQdpNlyWyVQxlxxG4lqgdFUu3A8P4O X-Received: by 2002:a6b:670f:: with SMTP id b15mr8418499ioc.15.1632481921414; Fri, 24 Sep 2021 04:12:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632481921; cv=none; d=google.com; s=arc-20160816; b=ULAJjfOLJQtj5GcV2dAMJkh9NXbLk4jCy18g9FIuCpz7wsKeRttWNOAdWvgjVtZ5ts 9i68nm6N1iFRQ6mQJqrarUPblzYYUrL5nTvAuP56IVE9KpwOZOTTkreGrjEEyTA7Xh+o UhJGDuPxuKYvA+DmV3gT3jNIaJ2oCWdWO4XthoLoLxGYHKfb2nJdy7S4xdIAYr75ie09 hGAESYk8KjXRCkE3YloJLz4vmzueobqmGqsXEQ6tMoomHhMqji9dbVXy2tB9VadLITJS +yInsmROkJvFIVCqSW9cAIvKogM6vdLvj/DnvKBg+1YP7RwzA2dINFY0s3/pgb0WH8HC CFEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=arvKcy0oK1uFOhB3DROjhVP+WqafjpA1AZpd270wCvw=; b=p4vinMkdQLlDVMZSZxbEtge8YHC+ohjLFdhPyGRefJDVBfROXlizoRfxAeM8yUVC1P fCm+yxh0pGbTmxlui+5Z68/qzNEJP7evu+qh01/sdi5aMW3b0sZGyHrWqJmLDe4B9RYZ +NEGbFz3YbJTUMSQtrIgUoKk9/5EDTkV+XI9T0aiha5iffWn+ugJnGZ5b0IesEYO0M5i mp8l3ayxWHyluOMeRTAmIPSZFOXRBmHXZvfmvLlyPjZTB2JjFOAmTpTpwVd/PgjrAz8z gE7E0EaB3WFOPVHFDhYtPn6M1WYncpS18zPygm54S6g7ywyLHM4gxq3mMcsARfVXGZRp +vjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=i0IYMBS3; 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 d10si9142190ios.58.2021.09.24.04.11.43; Fri, 24 Sep 2021 04:12:01 -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=@linaro.org header.s=google header.b=i0IYMBS3; 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 S245074AbhIXJfT (ORCPT + 78 others); Fri, 24 Sep 2021 05:35:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237056AbhIXJfT (ORCPT ); Fri, 24 Sep 2021 05:35:19 -0400 Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4BD95C061756 for ; Fri, 24 Sep 2021 02:33:46 -0700 (PDT) Received: by mail-pl1-x62f.google.com with SMTP id n2so6048535plk.12 for ; Fri, 24 Sep 2021 02:33:46 -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=arvKcy0oK1uFOhB3DROjhVP+WqafjpA1AZpd270wCvw=; b=i0IYMBS3HK/kkWs1+qkNMSEnDmcVOFC1MK0IGtBlrzmtBl9xVa2SncSipBP5YE9/rd vWjOX/Y8J4ZzHRN0wLDXSEa95Aqyul3nHr28v2F6Bv7S/fE2FbrIFQyc4FuDafhDKAD5 ZCKycgKMz1YhqwBWsMdoXsn/0FTqpApY/WjgJYcESSb8hJ6xxtmg1e+y1l6Bs8sXhoxa 0WwtjRMUnZq3MGDK4U+6jBsgEo1YpvVBH5/YHyfJAbLR2OuFvxjuWGEYbz1WLvV6Kn6O ZcEyiVF/KgqZDAooL6uDCKS7Vq2/1CX+rSVulKWZJgyUoQYBCbD+/nkPpA8DN4rvvB1Z t5uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=arvKcy0oK1uFOhB3DROjhVP+WqafjpA1AZpd270wCvw=; b=1qkbAA6w6Wg7OVOzRBtYWrHBl7vrv5iytr8gu+oSYqubhL3VZeLYc1jcu1QLZPeqdS KSfx9R9Atjf4DueOAfDW3IBo2HOiQfl4/BUXJkMgFm0RX0YlfNV4qERraPG2m+6fzQji WLOaSobMJopzm7bdybNj2M5VtF4TMr/FVLOl4/rMUoKOpBgXT43H2CJF+8LFWUdp9OLt uVmOVh+1hEDqjIPg7sp0slrOjjN6n26GciYYe2UGpd1Yz/PHNM9qPLsfRg3G95vG2Eqk bEsse31T5s7pN3vvHZYQgyqYsryCTRqWJ8ubCfyQpKGVmKPkLzzlJN7VmV2roSwPjW1E Zs9g== X-Gm-Message-State: AOAM532eCTERajPuRU604Cw7qrCDQVKCaY6owmto5bt48R4F/b8aUaLc 5nU2GMwb/NoQn8iZ6dE8ec4D4rrJSwuEDqgZzibSFQ== X-Received: by 2002:a17:90b:4a88:: with SMTP id lp8mr1080883pjb.159.1632476025514; Fri, 24 Sep 2021 02:33:45 -0700 (PDT) MIME-Version: 1.0 References: <871r5p0x2u.fsf@codeaurora.org> <877df6tlnq.fsf@codeaurora.org> In-Reply-To: <877df6tlnq.fsf@codeaurora.org> From: Loic Poulain Date: Fri, 24 Sep 2021 11:43:55 +0200 Message-ID: Subject: Re: [regression] mhi: ath11k resume fails on some devices To: Kalle Valo Cc: Manivannan Sadhasivam , ath11k@lists.infradead.org, linux-wireless@vger.kernel.org, linux-arm-msm , regressions@lists.linux.dev Content-Type: multipart/mixed; boundary="0000000000009bbc5c05ccba717f" Precedence: bulk List-ID: X-Mailing-List: linux-wireless@vger.kernel.org --0000000000009bbc5c05ccba717f Content-Type: text/plain; charset="UTF-8" Hi Kalle, On Fri, 24 Sept 2021 at 10:36, Kalle Valo wrote: > > Loic Poulain writes: > > > Hi Kalle, > > > > On Thu, 16 Sept 2021 at 10:00, Kalle Valo wrote: > >> > >> Hi Loic and Mani, > >> > >> I hate to be the bearer of bad news again :) > >> > >> I noticed already a while ago that commit 020d3b26c07a ("bus: mhi: Early > >> MHI resume failure in non M3 state"), introduced in v5.13-rc1, broke > >> ath11k resume on my NUC x86 testbox using QCA6390. Interestingly enough > >> Dell XPS 13 9310 laptop (with QCA6390 as well) does not have this > >> problem, I only see the problem on the NUC. I do not know what's causing > >> this difference. > > > > I suppose the NUC is current PCI-Express power during suspend while > > the laptop maintains PCIe/M2 power. > > Sorry, I'm not able to parse that sentence. Can you elaborate more? Ouch, yes, I wanted to say that the NUC does not maintain the power of PCI express during suspend (leading to PCI D3cold state), whereas the laptop maintains the power of the M2 card... well, not sure now I see your logs. > > >> At the moment I'm running my tests with commit 020d3b26c07a reverted and > >> everything works without problems. Is there a simple way to fix this? Or > >> maybe we should just revert the commit? Commit log and kernel logs from > >> a failing case below. > > > > Do you have log of success case? > > A log from a successful case in the end of email, using v5.15-rc1 plus > revert of commit 020d3b26c07abe27. > > > To me, the device loses power, that is why MHI resuming is failing. > > Normally the device should be properly recovered/reinitialized. Before > > that patch the power loss was simply not detected (or handled at > > higher stack level). > > Currently in ath11k we always keep the firmware running when in suspend, > this is a workaround due to problems between mac80211 and MHI stack. > IIRC the problem was something related MHI creating struct device during > resume or something like that. Could you give a try with the attached patch? It should solve your issue without breaking modem support. Regards, Loic --0000000000009bbc5c05ccba717f Content-Type: application/x-patch; name="0001-bus-mhi-Add-support-for-forced-resume.patch" Content-Disposition: attachment; filename="0001-bus-mhi-Add-support-for-forced-resume.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_kty6egb60 RnJvbSA2OTdjZjkwMTU1ZDc4MjI1ZDk2NzgzNmRjZGIyMjkxNDY4YzNlNjBkIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBMb2ljIFBvdWxhaW4gPGxvaWMucG91bGFpbkBsaW5hcm8ub3Jn PgpEYXRlOiBGcmksIDI0IFNlcCAyMDIxIDExOjE0OjAzICswMjAwClN1YmplY3Q6IFtQQVRDSF0g YnVzOiBtaGk6IEFkZCBzdXBwb3J0IGZvciBmb3JjZWQgcmVzdW1lCgpGb3Igd2hhdGV2ZXIgcmVh c29uLCBzb21lIGRldmljZXMgbGlrZSBhdGgxMWsgYXJlIG5vdCBpbiBNMyBzdGF0ZSB3aGVuCnJl c3VtaW5nLCBidXQgc3RpbGwgZnVuY3Rpb25hbC4gVGhlIG1oaV9wbV9yZXN1bWUgc2hvdWxkIHRo ZW4gbm90IGZhaWwKaW4gdGhhdCBjYXNlLCBhbmQgbGV0IHRoZSBoaWdoZXIgbGV2ZWwgZGV2aWNl IHNwZWNpZmljIHN0YWNrIGNvbnRpbnVlCnJlc3VtaW5nIHByb2Nlc3MuCgpBZGQgYSBuZXcgcGFy YW1ldGVyIHRvIG1oaV9wbV9yZXN1bWUsIHRvIHRyeSByZXN1bWluZywgd2hhdGV2ZXIgdGhlCmN1 cnJlbnQgTUhJIHN0YXRlIGlzLiBUaGlzIGZpeGVzIGEgcmVncmVzc2lvbiB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