From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.0 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2F3C8C4320E for ; Thu, 29 Jul 2021 15:10:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1124160720 for ; Thu, 29 Jul 2021 15:10:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237688AbhG2PKC (ORCPT ); Thu, 29 Jul 2021 11:10:02 -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-Google-Smtp-Source: ABdhPJyvEGB8FjJACYl3Fr7vWAR7dFS0J8VaBw0Le10jR0USiUfcLHOOMG8vDbEB/DEgNPj66v0To6sSiuu4EQ8RXyg= 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.