Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp6828516pxv; Fri, 30 Jul 2021 03:28:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwG0Yx3IOUcsOA0vWsFAkICkqdde3lH2OMlAK4qzHRDTeor0IU8US4khfzm1eAiNtIoszSd X-Received: by 2002:a17:907:724b:: with SMTP id ds11mr1967254ejc.192.1627640907721; Fri, 30 Jul 2021 03:28:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627640907; cv=none; d=google.com; s=arc-20160816; b=PwTlPRQ6P3uYkYk8KCMoqhXzcCFwrrLHgXTiulgHK4K0ND005bv4Z/1p+dn8O3bsWr ugC7M8JcNWzpsgN1ieye9zLPgM9ra4dXp3ZOmNGC5NqMP9vOMOD1ORyHK+TYq3T2QVZv 2kBwJClShnaUf2yFgEVI1Ha5SvYymAxoFDVb1LIa2gkUNq8Q76xHaUsT0Q3fnZXGg+6U AJSx4ULDmwz4CJfQ2O3XfZnpGgl2Z9Jhe/8kBIzeXXZeTipcEx/Qs3QLjnxYRGefMMP/ Y4h5w38yBNhO051Cnf6Z/W4lq5Q0mAxKDniRUraMVRycyBrKTSN1wkHNU0yLy2QxlcW9 YUEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=Whtn1PCwG6DDM6b4sFc2F4SmT3ekDIEexeL0P1N6FUE=; b=cP9HncMs8IRuSyjlphsSS8fKd3vOQfAL8dVPCuJKd8XJEvqRsC22zKBOiUv7cAcP0f dr5HfnvdXFHIFX5PNfQSHTpVtJ0ZcDsdsIutzu4b7545VqTT+hvv8/lnDY0cl7+UVLgH Ho7+CN3s8nHhDaxGy/e3GvUZV6uH54wH+svJzUphz32Yb/Dd6gg6EBf3Y99gpXj6x8TV ckMzbGcOIh9j1V4AnLaD0MBHvQsZN95G1zb+AXgUPGq2U49bIdt6ygEE2grvyZUb5aM2 wpNjz/j5/HolSqlsI/mOkufi8gr1g2Ucvb3G4rDT7JHWseaPSivcx5jciqkaNzO/0dJC J+4w== 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o13si1343750ejm.0.2021.07.30.03.28.03; Fri, 30 Jul 2021 03:28:27 -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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238440AbhG3K0n (ORCPT + 99 others); Fri, 30 Jul 2021 06:26:43 -0400 Received: from mga11.intel.com ([192.55.52.93]:53264 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238274AbhG3K0n (ORCPT ); Fri, 30 Jul 2021 06:26:43 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10060"; a="209959346" X-IronPort-AV: E=Sophos;i="5.84,281,1620716400"; d="scan'208";a="209959346" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jul 2021 03:26:38 -0700 X-IronPort-AV: E=Sophos;i="5.84,281,1620716400"; d="scan'208";a="418432773" Received: from lahna.fi.intel.com (HELO lahna) ([10.237.72.163]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jul 2021 03:26:34 -0700 Received: by lahna (sSMTP sendmail emulation); Fri, 30 Jul 2021 13:26:31 +0300 Date: Fri, 30 Jul 2021 13:26:31 +0300 From: Mika Westerberg To: "Rafael J. Wysocki" Cc: Linux PCI , Linux ACPI , Linux PM , LKML , Bjorn Helgaas , Kai-Heng Feng , Utkarsh H Patel , Koba Ko Subject: Re: [PATCH v1.1 1/2] PCI: PM: Avoid forcing PCI_D0 for wakeup reasons inconsistently Message-ID: References: <4668274.31r3eYUQgx@kreacher> <2207145.ElGaqSPkdT@kreacher> <2593738.mvXUDI8C0e@kreacher> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2593738.mvXUDI8C0e@kreacher> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 29, 2021 at 05:54:28PM +0200, 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 singaling 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 Reviewed-by: Mika Westerberg Tested-by: Mika Westerberg