Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2404367yba; Mon, 22 Apr 2019 06:17:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqxSSdcTiK3HjEoE0wJSOsMYXsYm2djD3WnMfH+nAKpreOXq5U1ciNJn8poZS7SjSa6sv/Xn X-Received: by 2002:a17:902:e406:: with SMTP id ci6mr1236288plb.196.1555939033973; Mon, 22 Apr 2019 06:17:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555939033; cv=none; d=google.com; s=arc-20160816; b=cA1mmm+CkdtFZaCncaw6fFZmt9HEOQL/1a7b/Lc+yfeph6zxJQFVe23u4+NvUQ+nHZ Mm3TiJ48zZWU0/HGmprMtTSGvYnW9Fg575ZaqcYQdZucvpSVsZY10BehT3RVpHBLGE37 y2Y50TK6wnseKe2wbt3xH0umpiXSKFaGbzxkwWtEPRIdlprxSUxQzy/r23ER127CN9nM Iv8DKdqn8zFLlHLw7NvBXhp0Exkv0r/upqWzU6qOuhJIlrCJ5hU3BQDBqXhq0hm6Ta/P JpOjRgbVEYoW8yoXBdjDDeOYzc8PzNt9uVFvQGRNoH71b+pZK5xGYzETcyza674MOpf7 gE9A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:content-disposition :mime-version:message-id:subject:cc:to:from:date:dkim-signature; bh=GdW1zwwBTrS4EZqUkZA0HZC2Svy4r4AonDP3vRHWuog=; b=rzC8+SPnHh8oYY57eu3xkA59bAfH5tdGjeDG1Y1Ex7MQK2M1CXR96IgjTunQe//tLe jSN9zX2EbjzKa+XyuHUGcVTW88z2bbT/F6DvTS/0QODwhyVNzgdHI3UEjne2YrqIE2wF /CpM3wqr3KpmuBbZQ4BiJRkw/15XniKmx3iNDBnj0ekiKtZKG1miiUcEciq450SpqOGs 6jV61b3MpNg8RhGCQ8Tc24QOXfI0fC5xTIqkBggDc0iW5ye7SlH+gcqdoVGzFK0QQDbR eUL0j0ee2IH64aWAd0/5NtvEn8OvMeNX/4TEC6KcxJxmIkZqZ7ZB6CzpSqKo4Xz1gwMQ CUPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="YmDnEgK/"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h22si13148841pfn.238.2019.04.22.06.16.19; Mon, 22 Apr 2019 06:17:13 -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; dkim=pass header.i=@kernel.org header.s=default header.b="YmDnEgK/"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727314AbfDVNIR (ORCPT + 99 others); Mon, 22 Apr 2019 09:08:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:47012 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726057AbfDVNIR (ORCPT ); Mon, 22 Apr 2019 09:08:17 -0400 Received: from localhost (50-82-46-41.client.mchsi.com [50.82.46.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 960FA20859; Mon, 22 Apr 2019 13:08:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1555938495; bh=OE4Uyda6pp9S086SNamKpeWxD6ARSUpU/OWOpUwXii4=; h=Date:From:To:Cc:Subject:From; b=YmDnEgK/CJeBar11/fjiHBOK05AIv+g33sYeNoIqN+vNuAF5gbNqqRobUfqRh0/Wy G3NVLDtiTMM4OA3yeWLXFtIheCzC4lxX4E5MNUStLoApVHka7zzrwwNuSS0BodXcBi ihE/kh7F2y92TKOldBBexlPT+BSTrsW4izvpa6qc= Date: Mon, 22 Apr 2019 08:08:14 -0500 From: Bjorn Helgaas To: Jarkko Nikula Cc: Keijo Vaara , Jean Delvare , "Rafael J. Wysocki" , Benjamin Tissoires , Dmitry Torokhov , linux-pm@vger.kernel.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [Bug 203297] Synaptics touchpad TM-3127 functionality broken by PCI runtime power management patch on 4.20.2 Message-ID: <20190422130814.GJ173520@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org https://bugzilla.kernel.org/show_bug.cgi?id=203297 Regression, suspected but as yet unconfirmed cause: c5eb1190074c ("PCI / PM: Allow runtime PM without callback functions") backported to 4.20 stable as 39e1be324c2f. Keijo Vaara reported: > After upgrading from 4.20.1 to 4.20.2 Synaptics touchpad TM-3127 on HP > 250 G5 is recognized in all logs like normal, but PCI runtime power > management seems to keep it from working shortly after module > initialization. Issuing "modprobe -r psmouse && modprobe psmouse" fixes > the issue but the device stops working again if inactive for a second or > so. This is likely caused by https://lkml.org/lkml/2019/1/11/615. > > Possible workarounds known to work: > 1) Forcing psmouse module to use imps protocol works, but disables most > of the touchpad functionality such as two finger scrolling. > 2) Disabling PCI runtime power management for the device (f.e. using tlp > RUNTIME_PM_ON_BAT=on fixes the issue) > 3) Downgrade kernel to 4.20.1 > > The bug has been reported by multiple users with different software > setups, all with HP laptops (see > https://bbs.archlinux.org/viewtopic.php?id=243677 for more info). > > The suspect commit from kernel log: > > commit 39e1be324c2f9048b013aaa190acf91b3f23b1a8 > Author: Jarkko Nikula > Date: Tue Oct 23 14:45:52 2018 +0300 > > PCI / PM: Allow runtime PM without callback functions > > commit c5eb1190074cfb14c5d9cac692f1912eecf1a5e4 upstream. > > a9c8088c7988 ("i2c: i801: Don't restore config registers on runtime PM") > nullified the runtime PM suspend/resume callback pointers while keeping the > runtime PM enabled. > > This caused the SMBus PCI device to stay in D0 with > /sys/devices/.../power/runtime_status showing "error" when the runtime PM > framework attempted to autosuspend the device. This is due to PCI bus > runtime PM, which checks for driver runtime PM callbacks and returns > -ENOSYS if they are not set. > > Since i2c-i801.c doesn't need to do anything device-specific for runtime > PM, Jean Delvare proposed this be fixed in the PCI core rather than adding > dummy runtime PM callback functions in the PCI drivers. > > Change pci_pm_runtime_suspend()/pci_pm_runtime_resume() so they allow > changing the PCI device power state during runtime PM transitions even if > the driver supplies no runtime PM callbacks. > > This fixes the runtime PM regression on i2c-i801.c. > > It is not obvious why the code previously required the runtime PM > callbacks. The test has been there since the code was introduced by > 6cbf82148ff2 ("PCI PM: Run-time callbacks for PCI bus type"). > > On the other hand, a similar change was done to generic runtime PM > callbacks in 05aa55dddb9e ("PM / Runtime: Lenient generic runtime pm > callbacks"). > > Fixes: a9c8088c7988 ("i2c: i801: Don't restore config registers on runtime PM") > Reported-by: Mika Westerberg > Signed-off-by: Jarkko Nikula > Signed-off-by: Bjorn Helgaas > Reviewed-by: Jean Delvare > Reviewed-by: Rafael J. Wysocki > Cc: stable@vger.kernel.org # v4.18+ > Signed-off-by: Greg Kroah-Hartman