Received: by 10.223.185.116 with SMTP id b49csp1069341wrg; Fri, 23 Feb 2018 11:21:22 -0800 (PST) X-Google-Smtp-Source: AH8x226MDTjWI61L4KlT1u1yZ8g6nTmpHe7zAlqw6KpseRGdUnYq0YEQ3OUF3rQ5DOrEI4d5aBAt X-Received: by 10.101.96.43 with SMTP id p11mr1398436pgu.430.1519413682206; Fri, 23 Feb 2018 11:21:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519413682; cv=none; d=google.com; s=arc-20160816; b=JAgMG0zsScT06QUlC0FY2Sy2O7bHdQSEjeVANWmya2IMbMRuB9boJH+cl0kDMjsbeS 869TQAIWJXSXvxcNIsjggi9p465Y86WgXVortbIvJdqG4W6CnJbGsjvvzH1BOHDghc/j MpagoHbJxChVUDZ5LsxgCU9Y43ligaFh+i9wWCgkb4BlrRNavTY2d9+KhXTuyLrmijQN PMdCQWJO1aFDjLr5907E+q1DwKMEMT64oEgbX/vk0BtbQOMTkZuOSAqJMjRa5x4N2Zsr jTFY4u7JgGJwIOW9ifkFfeT3u5kIt+G2D2AKeDSz51oJmGotdsVu3YSAR2ehOVBxLSFs foLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=C6veyivqUR10blWSuf7VW0yFRdEz78xauaN1jP7Zi3Q=; b=ALHNVnibFQON71D7/Q/6x6VHwbaxAObJvz/n8e8a5YIgaQRCsHvNkaAr8yi5e2ortV wkVfW5VMgs9s8tcym3GuEVdytx0XUilIhcMA0kkUaAzkNSHJN3QtOPBzOGlYUo+Q6BM0 rHFY0GnViLr+8e2+cSSWGI5152kKRix5eqALnAg7zJmvfkDHlBaKU+mV+WTdfmh7UhR6 KaNUvZ9b19ayvJg84tJ+T+ZcHpC6AKBvOZa0oJ9Dh+RVdllpGGwpl0cjruSI+LJdUk7S /lIQNUSgmVuHR5GAXv+6t5hkxODBHmfqGdlzj8Jp9tUj/CEOKlp03lbUyH+cqeWC+gii W2YQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i72si1849994pgd.576.2018.02.23.11.21.07; Fri, 23 Feb 2018 11:21:22 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935457AbeBWSyM (ORCPT + 99 others); Fri, 23 Feb 2018 13:54:12 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:47652 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964898AbeBWSyJ (ORCPT ); Fri, 23 Feb 2018 13:54:09 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 29AB81148; Fri, 23 Feb 2018 18:54:09 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Adrian Hunter , "Rafael J. Wysocki" , Lukas Wunner , Sasha Levin Subject: [PATCH 4.14 106/159] PM / runtime: Fix handling of suppliers with disabled runtime PM Date: Fri, 23 Feb 2018 19:26:54 +0100 Message-Id: <20180223170756.223462110@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180223170743.086611315@linuxfoundation.org> References: <20180223170743.086611315@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: "Rafael J. Wysocki" [ Upstream commit 31eb7431805493e10f4731f366cf4d4e3e952035 ] Prevent rpm_get_suppliers() from returning an error code if runtime PM is disabled for one or more of the supplier devices it wants to runtime-resume, so as to make runtime PM work for devices with links to suppliers that don't use runtime PM (such links may be created during device enumeration even before it is known whether or not runtime PM will be enabled for the devices in question, for example). Fixes: 21d5c57b3726 (PM / runtime: Use device links) Reported-by: Adrian Hunter Signed-off-by: Rafael J. Wysocki Reviewed-by: Lukas Wunner Tested-by: Adrian Hunter Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/base/power/runtime.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- a/drivers/base/power/runtime.c +++ b/drivers/base/power/runtime.c @@ -276,7 +276,8 @@ static int rpm_get_suppliers(struct devi continue; retval = pm_runtime_get_sync(link->supplier); - if (retval < 0) { + /* Ignore suppliers with disabled runtime PM. */ + if (retval < 0 && retval != -EACCES) { pm_runtime_put_noidle(link->supplier); return retval; }