Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2904971ybd; Mon, 24 Jun 2019 15:06:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqzOoRICc6jkoCDIo6T1tiY1TBE/Lmnon9KpXSn5BOhxTrl9Hh8R536386tjCsQ8VeIAfVBX X-Received: by 2002:a63:8a41:: with SMTP id y62mr23250589pgd.38.1561413988881; Mon, 24 Jun 2019 15:06:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561413988; cv=none; d=google.com; s=arc-20160816; b=HnrdTCOemP7RoKHkxiGBN7v4zIHvXQ7TeG0mMrxtJ5GK9+VlP5txdFWwhZrgVDvIU1 UPi1FT/j/N6BR0CpGM/A4tkbQRcx9ZsqyDozyvLmvQwxityf0r0lpDbZa4DFaqSdOmCu WPcuWjshIx79MTyFCcNmEc92AFeVCmZaE54eYBlbisMqpHAvlPZzrKed/al+FtHwDjVp 6zofG63HnfPNv6u2q3EMpfl2XSGS8vKuSsWAFZIodqf/turC73lL2sDSM3lbufJGjVQH nbhBr3QrqH6HE2fFU9WrmGlkWlhJmptmfK+OTj2sLHccxUfUg6ZnDfTgPLGjz3suaQah on5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=4xCtwElI364QfKnvdzlikQ/i499dYfxJ/Sd4Q5QDxdU=; b=GkngfZsBW5k+Pl3A7BgqdBDMS5KMi+FlRCjblifKEVq0RbXzl40v9P8pYUYkGnCPbf PrmBvBMYaO/VU9ov6E7MnR0z+DI5c1dQWGzjlZI3pWxaNy+GsQRk8zWLeK3hx24LB6NO DgpE2ur46hv8adV8ChS8UDjck7OJ0EDS+84Qm6/Cvh+HLbeowrF4wtN87sqY5CXrc6kj 6Ki1zUYpXu0ne8ewY/CwWcasjsHPYNE6jdYm4KFqUMz0+TF7Oe4RbOeIkJZ6olI6LovJ FWy9KRn+j4o1sEtk/YqkFSbV8a6GPEfwnpUtEU8ptpcSiwdYmG/BLwAM3geKbCeHbwGm Qw3w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x24si10865013pgh.393.2019.06.24.15.06.13; Mon, 24 Jun 2019 15:06:28 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729117AbfFXVhm (ORCPT + 99 others); Mon, 24 Jun 2019 17:37:42 -0400 Received: from mail-ot1-f66.google.com ([209.85.210.66]:38147 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728952AbfFXVhm (ORCPT ); Mon, 24 Jun 2019 17:37:42 -0400 Received: by mail-ot1-f66.google.com with SMTP id d17so15108612oth.5; Mon, 24 Jun 2019 14:37:41 -0700 (PDT) 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=4xCtwElI364QfKnvdzlikQ/i499dYfxJ/Sd4Q5QDxdU=; b=Dfo8gtevVSgYatIgNihgM55byAc8Kx/LYOIKR3zR6wqR97K2koVR5lMqFEu0nVX62j VpA9NyTtnr+jZoHmY5g6SsSrMmqG7Emvv9RFoVQ7HVPIyC7Y654WBbL/IAvqPHyRSYPX 6qkJA3jyg/KjiBM26RnUCNmSdFwFJ7F2KTKFDz5AC6P1quF64OcimBPCd8q9i8h/ML3m WvdGbpR3KOynoHJ9IxsQ/5K/th56QEWZb8lTPpYVcH/et8M8lvM5vGITg97C/iFIAxIx RsQs9tBpLWhSpHSipQXesoemjFW/rUOkOTxBxQPksN/Avd+1JF/pY3Ew4KDN795P5YaQ J4iQ== X-Gm-Message-State: APjAAAXRJ9UwGrwBYVPCHrbLawqtVvak3D6pbyBb8aQdAfQUsqgTxZWV FXzKfGmbP+Kb7pxdfEYY47LuSb6QhljEWLbCMTg= X-Received: by 2002:a05:6830:8a:: with SMTP id a10mr2331359oto.167.1561412261402; Mon, 24 Jun 2019 14:37:41 -0700 (PDT) MIME-Version: 1.0 References: <1668247.RaJIPSxJUN@kreacher> <9906d02b-8c77-f2c8-7168-93ea444b950e@nvidia.com> In-Reply-To: <9906d02b-8c77-f2c8-7168-93ea444b950e@nvidia.com> From: "Rafael J. Wysocki" Date: Mon, 24 Jun 2019 23:37:29 +0200 Message-ID: Subject: Re: [PATCH v2] PCI: PM: Skip devices in D0 for suspend-to-idle To: Jon Hunter Cc: "Rafael J. Wysocki" , Linux PCI , Bjorn Helgaas , Linux PM , Linux ACPI , LKML , Mika Westerberg , Keith Busch , Kai-Heng Feng , linux-tegra Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jun 24, 2019 at 2:43 PM Jon Hunter wrote: > > Hi Rafael, > > On 13/06/2019 22:59, Rafael J. Wysocki wrote: > > From: Rafael J. Wysocki > > > > Commit d491f2b75237 ("PCI: PM: Avoid possible suspend-to-idle issue") > > attempted to avoid a problem with devices whose drivers want them to > > stay in D0 over suspend-to-idle and resume, but it did not go as far > > as it should with that. > > > > Namely, first of all, the power state of a PCI bridge with a > > downstream device in D0 must be D0 (based on the PCI PM spec r1.2, > > sec 6, table 6-1, if the bridge is not in D0, there can be no PCI > > transactions on its secondary bus), but that is not actively enforced > > during system-wide PM transitions, so use the skip_bus_pm flag > > introduced by commit d491f2b75237 for that. > > > > Second, the configuration of devices left in D0 (whatever the reason) > > during suspend-to-idle need not be changed and attempting to put them > > into D0 again by force is pointless, so explicitly avoid doing that. > > > > Fixes: d491f2b75237 ("PCI: PM: Avoid possible suspend-to-idle issue") > > Reported-by: Kai-Heng Feng > > Signed-off-by: Rafael J. Wysocki > > Reviewed-by: Mika Westerberg > > Tested-by: Kai-Heng Feng > > I have noticed a regression in both the mainline and -next branches on > one of our boards when testing suspend. The bisect is point to this > commit and reverting on top of mainline does fix the problem. So far I > have not looked at this in close detail but kernel log is showing ... Can you please collect a log like that, but with dynamic debug in pci-driver.c enabled? Note that reverting this commit is rather out of the question, so we need to get to the bottom of the failure.