Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp388060pxb; Wed, 13 Apr 2022 03:35:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzxUoBF/moGQNHXzZtck7dmRTUqJujJgaf6nLS/+m8JtxULQAXuAIJticvRfFsN3PBI4U1y X-Received: by 2002:a17:90a:410a:b0:1cb:a279:6679 with SMTP id u10-20020a17090a410a00b001cba2796679mr10021934pjf.211.1649846144562; Wed, 13 Apr 2022 03:35:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649846144; cv=none; d=google.com; s=arc-20160816; b=JodMNHAbqxdZUBj64Cb0eIixecdkJNDyjnbzytME56EHFmRfYsh9I+jsOHs/XfSV/d opGkPexNP5CJZ4NPmSGFE5XRs65CXvsQbNykwIMrt2QnWKIcEuM5hsWdAFTFfZSFmnuv jYcnpzlZRa+ebMQncbvsxY3htLVzs2GJi6WG87jGqMGDnzlDp8wq5ik31QUCG7F7gC6X +PzFzGzL5SQkO4DQrV2hAPzTEZxwqoDkASaW/XmzTnt0zfzYjxzUDgU0aYSgOiI3722G QazUIMsoksAF9VbEkzaWKOYEeKqVNmshv7wg6QdfDlsTPzMuXQle4gSXmKA9VomleCwq 1dLg== 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=wA/XhN+liF7FNQdYD63xlSjmBiv/wnn45LKu56yG8aw=; b=ZkXqPKnHanrciTpWOo9lAffBs7MqR4aNzJHdQkiVt3P60jHIo6uP54Szdmi/C10mi6 9sMjnjdtL/D8y1lioHg8SFW4SOcrBzd9zyAjcWSsNz83ydu3O8T5/8igOQreX070O/1e Zh8/PFHyBUf+1PKgK+6c8tTegjVgWld3qfZwzD81TAEhUCL2e6AyzeSjGyzrMmEn6tSr SUAyzfsuOo0nmQ46H74Ik4QvmsE02H0qbxWDbPI1+U3SefbIymWwZZOVE47QAS9fS7U2 EhFgZeI4y25BRK5UD46833OFyHRbZIwKebxTRAANTPO9j6KX0z8hx+QOoFUGjWb/P1O/ FfZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AreLMy3L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w7-20020a63f507000000b00399345490cesi5464203pgh.419.2022.04.13.03.35.31; Wed, 13 Apr 2022 03:35:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AreLMy3L; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S233190AbiDMHIV (ORCPT + 99 others); Wed, 13 Apr 2022 03:08:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53406 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232747AbiDMHIN (ORCPT ); Wed, 13 Apr 2022 03:08:13 -0400 Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFD732ED62 for ; Wed, 13 Apr 2022 00:05:52 -0700 (PDT) Received: by mail-pg1-x532.google.com with SMTP id q12so953509pgj.13 for ; Wed, 13 Apr 2022 00:05:52 -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=wA/XhN+liF7FNQdYD63xlSjmBiv/wnn45LKu56yG8aw=; b=AreLMy3LsZ/2P+aighUoU5gjlgpeBV8R7aO4E6ZmNrH9sPFlHDYfXCQ9dsaQSKUUDZ jV695MA6AjTW9RaVAKwYYDjPOSnx5VhKZBhY+t+VOpMmHsvuvmUO3uevsu7U4SoQZX/Q hKY670Ht3+qDXUL6ihxfD4vmxjl3ro3ScX1SDiJ3bn9yNvTvyI5Jk5d9mYgm8hoPX7qr 1+qPrlrepeFD1qFKz+Inw4HQwj7zVmeaIa1RIZvKj+dElNrFnhxT76DSr9HnuNU6qNNj CDAr/V+AXPW6hm65wKobzJCFQHpgmZ/HCfP68ZL1bibg1imj6sYE0SrrHqGdYcyfLpKZ /IFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=wA/XhN+liF7FNQdYD63xlSjmBiv/wnn45LKu56yG8aw=; b=EK4sEH4Yf4Tt1uwK2W+az5LgtNcmd8jRLL73WKO+gHL59Xd6iK+L5kXk3TKb/Wxxp2 HbTzHtcjBJfOBTK3SybY3Rgl+9+0BiOEjSAUgasoOqpitFwdCIUfufqR+V4aIye51FyL 3E9s1A1MlPFMsmvF5QssUwNj77F10OGWILBs+J9JqEejYFMIIculYdM7cH+/s8ZqX8gY JmHJh5RQgCDphWmIB9XDBEshZ6nSyd65Dy4Nmd9fvhznuOmJ9a0EPBT3HiVg1JJizk52 4irHmf3MgzSV7LmC7SHpLMuqTo1dyR4MHDmybmWg0jKreQ15KDID9dNKoFsrzm4gPT5q AmEQ== X-Gm-Message-State: AOAM532qFyaSKDBA+M81IxPxZkMtljDhnflDjF6dwIXe2kHg7Xql1BWd ZouaTiowbfk7Q6T4x+/tvrx8 X-Received: by 2002:a05:6a00:10cc:b0:505:ada6:e03e with SMTP id d12-20020a056a0010cc00b00505ada6e03emr17405824pfu.45.1649833552212; Wed, 13 Apr 2022 00:05:52 -0700 (PDT) Received: from thinkpad ([117.207.28.99]) by smtp.gmail.com with ESMTPSA id t15-20020a63b70f000000b00381510608e9sm5035307pgf.14.2022.04.13.00.05.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Apr 2022 00:05:51 -0700 (PDT) Date: Wed, 13 Apr 2022 12:35:42 +0530 From: Manivannan Sadhasivam To: Dmitry Baryshkov Cc: Kalle Valo , Prasad Malisetty , agross@kernel.org, bjorn.andersson@linaro.org, lorenzo.pieralisi@arm.com, robh@kernel.org, kw@linux.com, bhelgaas@google.com, linux-pci@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, rajatja@google.com, refactormyself@gmail.com, quic_vbadigan@quicinc.com, quic_ramkri@quicinc.com, swboyd@chromium.org, linux-wireless@vger.kernel.org, ath11k@lists.infradead.org Subject: Re: [PATCH v4] PCI: qcom: Add system PM support Message-ID: <20220413070542.GB2015@thinkpad> References: <1646679306-4768-1-git-send-email-quic_pmaliset@quicinc.com> <20220412060144.GA41348@thinkpad> <87k0buoa9j.fsf@kernel.org> <20220413054904.GA2015@thinkpad> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 13, 2022 at 09:36:30AM +0300, Dmitry Baryshkov wrote: > On Wed, 13 Apr 2022 at 08:49, Manivannan Sadhasivam > wrote: > > > > On Tue, Apr 12, 2022 at 01:40:08PM +0300, Kalle Valo wrote: > > > + ath11k > > > > > > Manivannan Sadhasivam writes: > > > > > > > +Kalle, linux-wireless > > > > > > > > On Tue, Mar 08, 2022 at 12:25:06AM +0530, Prasad Malisetty wrote: > > > >> Add suspend_noirq and resume_noirq callbacks to handle > > > >> system suspend and resume in dwc PCIe controller driver. > > > >> > > > >> When system suspends, send PME turnoff message to enter > > > >> link into L2 state. Along with powerdown the PHY, disable > > > >> pipe clock, switch gcc_pcie_1_pipe_clk_src to XO if mux is > > > >> supported and disable the pcie clocks, regulators. > > > >> > > > > > > > > Kalle, is this behaviour appropriate for WLAN devices as well? The devices > > > > will be put into poweroff state (assuming no Vaux provided in D3cold) during > > > > system suspend. > > > > > > ath11k leaves the firmware running during suspend. I don't fully > > > understand what the patch is doing, but if it cuts the power from the > > > WLAN chip during suspend that will break ath11k. > > > > > > > Thanks Kalle for the confirmation. Yes the device will be put into D3cold state > > and that will most likely equal to poweroff state. > > Just to remind that ath11k on Qualcomm boards has a separate power > supply, not directly tied to the PCIe power supply. > It may change in the future or on a different OEM setup. Irrespective of that, this patch sends the PME_Turn_Off event to the ep devices. The devices in turn will shutdown the internal resources for poweroff/refclk removal. Therefore the device state shall be lost. Thanks, Mani > > Prasad, you should try to just turn off the host resources like clocks and > > regulators (not refclk) and let the device be in the default state > > (D3hot/L{0/1}?) during suspend. > > > -- > With best wishes > Dmitry