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=-5.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_MUTT 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 3BC87C46470 for ; Fri, 17 May 2019 07:32:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1CC10206A3 for ; Fri, 17 May 2019 07:32:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728335AbfEQHcT (ORCPT ); Fri, 17 May 2019 03:32:19 -0400 Received: from mga07.intel.com ([134.134.136.100]:54642 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728207AbfEQHcT (ORCPT ); Fri, 17 May 2019 03:32:19 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 May 2019 00:32:18 -0700 X-ExtLoop1: 1 Received: from lahna.fi.intel.com (HELO lahna) ([10.237.72.157]) by fmsmga001.fm.intel.com with SMTP; 17 May 2019 00:32:15 -0700 Received: by lahna (sSMTP sendmail emulation); Fri, 17 May 2019 10:32:14 +0300 Date: Fri, 17 May 2019 10:32:14 +0300 From: Mika Westerberg To: "Rafael J. Wysocki" Cc: Linux ACPI , Linux PM , LKML , Linux PCI , Bjorn Helgaas , Andy Shevchenko Subject: Re: [PATCH] ACPI/PCI: PM: Add missing wakeup.flags.valid checks Message-ID: <20190517073214.GA2781@lahna.fi.intel.com> References: <2091978.9z20bSIm3T@kreacher> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2091978.9z20bSIm3T@kreacher> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org On Thu, May 16, 2019 at 12:42:20PM +0200, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > Both acpi_pci_need_resume() and acpi_dev_needs_resume() check if the > current ACPI wakeup configuration of the device matches what is > expected as far as system wakeup from sleep states is concerned, as > reflected by the device_may_wakeup() return value for the device. > > However, they only should do that if wakeup.flags.valid is set for > the device's ACPI companion, because otherwise the wakeup.prepare_count > value for it is meaningless. > > Add the missing wakeup.flags.valid checks to these functions. > > Signed-off-by: Rafael J. Wysocki Reviewed-by: Mika Westerberg