From patchwork Thu Nov 29 00:20:04 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rafael Wysocki X-Patchwork-Id: 1819601 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id D299D40AE5 for ; Thu, 29 Nov 2012 00:15:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756422Ab2K2APV (ORCPT ); Wed, 28 Nov 2012 19:15:21 -0500 Received: from hydra.sisk.pl ([212.160.235.94]:35636 "EHLO hydra.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756391Ab2K2APU (ORCPT ); Wed, 28 Nov 2012 19:15:20 -0500 Received: from vostro.rjw.lan (afdf208.neoplus.adsl.tpnet.pl [95.49.83.208]) by hydra.sisk.pl (Postfix) with ESMTPSA id 87AB5E3E31; Thu, 29 Nov 2012 01:17:09 +0100 (CET) From: "Rafael J. Wysocki" To: Jan-Matthias Braun Cc: Jiri Kosina , Benjamin Tissoires , Greg Kroah-Hartman , linux-input@vger.kernel.org Subject: Re: hid-multitouch: eGalax Touchscreen not resuming after suspend Date: Thu, 29 Nov 2012 01:20:04 +0100 Message-ID: <1655801.HZ7A866RlZ@vostro.rjw.lan> User-Agent: KMail/4.9.3 (Linux/3.7.0-rc7; KDE/4.9.3; x86_64; ; ) In-Reply-To: References: <8159607.SRZZrRIPNF@orthese> <1418196.mMF7t2R2GI@orthese> MIME-Version: 1.0 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org On Tuesday, November 27, 2012 09:26:11 PM Jiri Kosina wrote: > On Sun, 25 Nov 2012, Jan-Matthias Braun wrote: > > > Hi all, > > > > sorry for the e-mail address hopping. Answers to both addresses are okay. > > > > I have now done a git bisection from 3.0 to 3.1 and have found commit > > 1e2ef05bb8cf851a694d38e9170c89e7ff052741 PM: Limit race conditions between runtime PM and system sleep (v2) > > to be the first one to introduce the necessity of a module reload after resume. So with that commit your device doesn't work after resume from system suspend unless you reload the driver? > > I hope that this helps in finding a solution. As I (again) don't immediatly > > know how to go on, I kindly ask you to give me some hints for testing/patching > > or even a possible solution. :-) Can you apply the patch below to the current mainline kernel and see if it makes any difference, please? Rafael --- drivers/base/power/main.c | 4 ---- 1 file changed, 4 deletions(-) Index: linux/drivers/base/power/main.c =================================================================== --- linux.orig/drivers/base/power/main.c +++ linux/drivers/base/power/main.c @@ -589,8 +589,6 @@ static int device_resume(struct device * if (!dev->power.is_suspended) goto Unlock; - pm_runtime_enable(dev); - if (dev->pm_domain) { info = "power domain "; callback = pm_op(&dev->pm_domain->ops, state); @@ -1136,8 +1134,6 @@ static int __device_suspend(struct devic if (error) async_error = error; - else if (dev->power.is_suspended) - __pm_runtime_disable(dev, false); return error; }