Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp6173776pxv; Thu, 29 Jul 2021 08:11:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxnkiii9UcxCr70TWmkTpBvcfhhprU0MM22FWloSLetT9IX8oydAYSJWliedTYk0OIYrlht X-Received: by 2002:a5e:840f:: with SMTP id h15mr4496033ioj.93.1627571464578; Thu, 29 Jul 2021 08:11:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627571464; cv=none; d=google.com; s=arc-20160816; b=Zhih+I8JpoWQGXmUgedp3zgcsqpigaAqu7j3Iwg4XctQA71TWntVC8o3KlO3jktKmg XYZzjFtxk0KKKclUd7VI8dguzoMeS1XDqFdbeQazlmZadNb83OyvwkTQ0FdPmyjAXKCQ KC2+5SwYBnS4toyr3geVIzL79gsgv4ZhshU5wlOYkvxWGzVXbbKzPNxhf/Asy1BHXSbG W9FoYOzW6YCSskOQbAU63c2ZpiwLKF2Yc4y8qiNI3EqR8vu7b/ZdVFVJXvpzFQ0anhLG sI0CI7ferXIz7fWNyAHKhTbfP9fFubTXQopIhrWoMTQDcy5b3LAOUhVNhZ6hmrzAAlvM xrQQ== 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; bh=5bJH/fpoUt2uQkPvcGjyGDKgGhlQRm6pEd78vhS/jc4=; b=FrTe8U85OTuUB3i3YMQzNLsbwtwO5qLqg4CAZ7dURpEA3dJt6G/AG0DHvvZh9psVhe wPQJ/0QNr+ajYJVn+rvPco41JXRejjMq2fLj5IwoL1WNhhu5GfWgWt+b8UGOZWmsVM8+ aWTtYBr73KDng5cDSKUPaWa0axv54a+G0hGA3XB1WxFYobhKONtKNPm96R1VjUa/1NrT b30Ybkl9YqrAiQacjNxS8tqUcIQ1d2KVIrGX9FuWOyqgFQb2rt9rrKVR5KJELxY8b+Vt BCYw96z8FOPlfIT4e99HG9vSLmMlTMbGQZNi/kxy9EgdctBEUm4iW6/EOKfa6+udzgd9 4j0g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b11si4012657ile.42.2021.07.29.08.10.49; Thu, 29 Jul 2021 08:11:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237560AbhG2PKB (ORCPT + 99 others); Thu, 29 Jul 2021 11:10:01 -0400 Received: from mail-oi1-f173.google.com ([209.85.167.173]:44675 "EHLO mail-oi1-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229864AbhG2PKA (ORCPT ); Thu, 29 Jul 2021 11:10:00 -0400 Received: by mail-oi1-f173.google.com with SMTP id w6so8826205oiv.11; Thu, 29 Jul 2021 08:09:57 -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=5bJH/fpoUt2uQkPvcGjyGDKgGhlQRm6pEd78vhS/jc4=; b=dcpopyNmCSugC/5Ljm+GJtGYxWHX9qB3IgvaSbUM4/MjayxwF23BRzMAVQwKlGpS0e IVbdHO5V00PmyaQVbWedk2YpU4Zhk/uKQzKa61zivfwtR1LtXyp9Cr49eFD5byB5riJM kDImKeHY2/SJCkJ2dpYbZ3GCCRK+pswMaPSGrg/M1eR7mIcN5pZJJm66ddu1sGblbl9T /ZyDx4flkuY2c6OQKCvZ3GOLGBD751aVS/skUTXrScqZBwuHzQVHjvQutiEy483cmLSh gKxDPZGVP/D+FQC+wD87YbMfEKE3uwCrXk4dIKW+T17coe1Ze9TR+ZDhqhXEgTl1wTG9 JMPQ== X-Gm-Message-State: AOAM532ugR+AmWRt2QpIGJteHO8MM6QY1G5E9mFq/tq/1z3rrfxsrddK 28N3VS+z3lQmXQUxL2TpPwWTqwqpx2vJEpYz3xI= X-Received: by 2002:a05:6808:198c:: with SMTP id bj12mr1418309oib.71.1627571396779; Thu, 29 Jul 2021 08:09:56 -0700 (PDT) MIME-Version: 1.0 References: <4668274.31r3eYUQgx@kreacher> <2207145.ElGaqSPkdT@kreacher> In-Reply-To: <2207145.ElGaqSPkdT@kreacher> From: "Rafael J. Wysocki" Date: Thu, 29 Jul 2021 17:09:45 +0200 Message-ID: Subject: Re: [PATCH v1 1/2] PCI: PM: Add special case handling for PCIe device wakeup To: Mika Westerberg , Linux PCI Cc: Linux ACPI , Linux PM , LKML , Bjorn Helgaas , Kai-Heng Feng , Utkarsh H Patel , Koba Ko Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 29, 2021 at 4:49 PM Rafael J. Wysocki wrote: > > From: Rafael J. Wysocki > > It is inconsistent to return PCI_D0 from pci_target_state() instead > of the original target state if 'wakeup' is true and the device > cannot signal PME from D0. > > This only happens when the device cannot signal PME from the original > target state and any shallower power states (including D0) and that > case is effectively equivalent to the one in which PME signaling is > not supported at all. Since the original target state is returned in > the latter case, make the function do that in the former one too. > > Link: https://lore.kernel.org/linux-pm/3149540.aeNJFYEL58@kreacher/ > Fixes: 666ff6f83e1d ("PCI/PM: Avoid using device_may_wakeup() for runtime PM") > Reported-by: Mika Westerberg > Reported-by: Utkarsh H Patel > Reported-by: Koba Ko > Signed-off-by: Rafael J. Wysocki The subject of this patch should be different, let me resend it.