Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2004781imm; Mon, 3 Sep 2018 15:47:11 -0700 (PDT) X-Google-Smtp-Source: ANB0VdatPbz1bjkprsTBLdUyNNwpVUsPR34q0b0Ocz3EotElyQRWJkOL7g/3M0/l8ydTKhwLu+EB X-Received: by 2002:a63:f:: with SMTP id 15-v6mr28716301pga.430.1536014831044; Mon, 03 Sep 2018 15:47:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536014831; cv=none; d=google.com; s=arc-20160816; b=f7ZADspceMbA0aMsRZWkys1OB/y5oFOi3f42zcrxDUpFKDv4curuw3jKP7iXjRwtrU PFNLWZ7BnJhOw/nh3cmagM9WopFkgWgsr0z6vQMsEg+AuKIq4H/kTvzfmYDxvP2bFNNU 8hJtlbaQ6iYnyUPrqz9+CNgwP1WRe38ty5BIA2UiEYNXG20fMzZgkKwAQ2mNeBbD1Iz/ 6xLoGNlMQt3KP6RLGQoYVEa6011YrL9t3gh1oKeHRgxI+xByTqtIxEEQJQkwifdpAHQn 1f537eq3FiZ/dmCsy93hl8ZOeXcI8J8yvjaqHQVMSgofMa6n/FsQ4sMJSCeTFSogEInb 25TQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=B2ZtJzjvxPtAiN9iCXCtCfjc95Ga5VHCKm7NLJsNmCY=; b=is21J5CBvgdIx7fmyh9VC4RLmVegb1S+N53dmFtQoVrLb+n96HnLUDRql3p/GFWwMi GPkanxwzAclRJ2f+vInSJtI2n9JduG+14HuelUY8se6PaMJ1P+zq0qlyeoKEfaKPVv/y MuZrhOTeFJU9YkScFR5Y664crrp3FLxZ9l07hVmwpQ56Yu3CKEZQ33SMuaTofiG8eAgh dsEQGEc+fupZjfXJ4A82EdVkgUDOBwyXx1ZpdlLGuWiNciIqzJU2q7qsMu6PZYVl1Sje tjyUM8Mdt194hNtZeoU3ESEi4FpZFB0l85/DWCKOyjwjhRp9qYVcgZkgFMxa/l0dVz/l mo1Q== 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=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z63-v6si19747926pfi.214.2018.09.03.15.46.55; Mon, 03 Sep 2018 15:47:11 -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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726426AbeIDDIF (ORCPT + 99 others); Mon, 3 Sep 2018 23:08:05 -0400 Received: from mga02.intel.com ([134.134.136.20]:28872 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726047AbeIDDIF (ORCPT ); Mon, 3 Sep 2018 23:08:05 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Sep 2018 15:45:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,326,1531810800"; d="scan'208";a="67268784" Received: from twinkler-lnx.jer.intel.com ([10.12.91.48]) by fmsmga007.fm.intel.com with ESMTP; 03 Sep 2018 15:45:46 -0700 From: Tomas Winkler To: Greg Kroah-Hartman Cc: Alexander Usyskin , linux-kernel@vger.kernel.org, Tomas Winkler , stable@vger.kernel.org, "Rafael J . Wysocki" Subject: [stable v4.4.y 1/2] mei: me: allow runtime pm for platform with D0i3 Date: Tue, 4 Sep 2018 01:43:03 +0300 Message-Id: <20180903224304.15989-1-tomas.winkler@intel.com> X-Mailer: git-send-email 2.14.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org commit cc365dcf0e56271bedf3de95f88922abe248e951 upstream. >From the pci power documentation: "The driver itself should not call pm_runtime_allow(), though. Instead, it should let user space or some platform-specific code do that (user space can do it via sysfs as stated above)..." However, the S0ix residency cannot be reached without MEI device getting into low power state. Hence, for mei devices that support D0i3, it's better to make runtime power management mandatory and not rely on the system integration such as udev rules. This policy cannot be applied globally as some older platforms were found to have broken power management. Cc: # 4.4 Cc: Rafael J. Wysocki Signed-off-by: Tomas Winkler Reviewed-by: Alexander Usyskin Signed-off-by: Greg Kroah-Hartman --- drivers/misc/mei/pci-me.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/misc/mei/pci-me.c b/drivers/misc/mei/pci-me.c index adab5bbb642a..d5b84d68f988 100644 --- a/drivers/misc/mei/pci-me.c +++ b/drivers/misc/mei/pci-me.c @@ -230,8 +230,11 @@ static int mei_me_probe(struct pci_dev *pdev, const struct pci_device_id *ent) if (!pci_dev_run_wake(pdev)) mei_me_set_pm_domain(dev); - if (mei_pg_is_enabled(dev)) + if (mei_pg_is_enabled(dev)) { pm_runtime_put_noidle(&pdev->dev); + if (hw->d0i3_supported) + pm_runtime_allow(&pdev->dev); + } dev_dbg(&pdev->dev, "initialization successful.\n"); -- 2.14.4