Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp1177501pxb; Tue, 8 Feb 2022 10:57:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJzPhSfzYvl5l+qBncPsfyq3Xyc+E2yw4cw1FxhnlX6VaMvDCXf+bKbrZLvsSlZWdGW6I8HB X-Received: by 2002:a17:902:cf06:: with SMTP id i6mr156452plg.66.1644346651798; Tue, 08 Feb 2022 10:57:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644346651; cv=none; d=google.com; s=arc-20160816; b=jfTUvp7SwN6boM0UcDMzcuhmZYCrIhGJpmSvm11Lo8YOfbgI1stg3n0xZBuwhvQqCW +YfJxPX6ZwJeftCnOZC7jE/h/0GMHz565YrkHDPUloUmPMcxvqs4AkT3j6iBSazNuSr5 2oAunjRqjTPbeZlUQptp8bsKAUW+27q1CSNep9RceYB5a3weG+qqsvVJaLGYNpYPBuN8 PiZeoq1FRFvvmv+oVUERLV2ADg7zqvbiNO29k/xfmk2n0myqQJHRRGnauP856GmveW2d LPpq7LK/bw3zkD/2fX3da2QhBbLmBr36z2JrMk+1sox8W+4g41g/N4iD/jYeO9Ul06tn lFDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=vt/gagpi7Nz77MS3nqN6S2xR9wgWfKEo67s2ikFquW4=; b=tg/0paeg9CCLL/yB9egR1WH7fOZzvLLqSZp4zUq/pHFrKeFqLIWPSwYJTtZnl4dLZg DZUcIpjHeP0elWPVD7bFQrMJflSaiwiRn4sujaOuog7JxgIvwHE/XkljPJqdsptbXVl4 MoK23nQB5PIr22WPTDZG1w7ewIq9F5iFzX0IJohktuUJcWL/iVHYl1V1oktZBmbyRI0Y 3btwS+Z8aYJL65r4bPhIbR1yABCdBBErNrH1d9+FMWlfosLLY21yPyzzQ7KunDl50jBr dVkNgQxzDbtvJXTd73cbJXwDXKvqbkaNbKqtW9qQqYJlA0+XLnI7YMSWT7dXH/pG4pCR wyRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=lUAS4STJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x2si5234634plg.452.2022.02.08.10.57.18; Tue, 08 Feb 2022 10:57:31 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=lUAS4STJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236815AbiBGVJn (ORCPT + 99 others); Mon, 7 Feb 2022 16:09:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236763AbiBGVJl (ORCPT ); Mon, 7 Feb 2022 16:09:41 -0500 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4AC8BC0612A4 for ; Mon, 7 Feb 2022 13:09:41 -0800 (PST) Received: by mail-pj1-x1035.google.com with SMTP id v4so8252468pjh.2 for ; Mon, 07 Feb 2022 13:09:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=vt/gagpi7Nz77MS3nqN6S2xR9wgWfKEo67s2ikFquW4=; b=lUAS4STJmlb/kIZM8SF/4Ryb9okSY9EZuOgQ7Qgf/kt49L1yBAxGZZpoMMOHU0PTwj dUF3bKwsAG05zkWeWa0OF0b+4/xt3OeGMo29X8XI3scOaxnujmB8mQSj4ImH+1oPWrwn iSyTQd3SC6MzallyVG1Yu1kiTa++JJNE4x2SP9NzDkvYHgOJMAdr4hUSccI2dZ5gJREH JdGAJn+3n8F7sPz4vT0u2yCv7x/ZgbRlpzMHeASp82RIxffKxfJtpTq4CozVy9cb6BYk epZo2mtaEE+BpGCRbNGynkD7HNrcMOfanCDZrF+cMCaMCpA0AKDC4g4DrTmwJpuhfkZW Mjtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=vt/gagpi7Nz77MS3nqN6S2xR9wgWfKEo67s2ikFquW4=; b=HmZ9w3HE3+6EhNHzXr2xj08Wb1DBQ5ud/x6fc+iGAQU5Y6SFY1gny4L0+XqGFLkFBH H3wz6gyUKxKI0nlACzNyHmx86CxzSj76zbrh26+Nmhlv2oudTJGMLE/x9F9jZIo0nqqN bO/KWMTi9G3t+DdFJ1+Pt/lg2ZdqdbgcSmOqktTsKEVjMS8ZcxmoL5i6AymcxgDxwY/J YttCpWrtUnyAFd3mfi6mAFpS00CXt9toPh6jMMnT0P8aVRbVnm6bLY9XeAK6aZw2Ugc5 kehH+oTIRsveBK0UENr8NFDdLJWfy516JJ73coF4LnlRWzTqfqqyZwgdjL9WrbcRaUTf 5Sqw== X-Gm-Message-State: AOAM531o/v0EvoRWpgHh0ggHHg8wCe3FeeHUJvyh/yvMfBDfA9B2L+vv Kwv3mXaE4Wj8gCEwQf26LWIXSUlJ48LQP+d3jPGIxA== X-Received: by 2002:a17:90a:348f:: with SMTP id p15mr824119pjb.173.1644268180043; Mon, 07 Feb 2022 13:09:40 -0800 (PST) MIME-Version: 1.0 References: <89456fcd-a113-4c82-4b10-a9bcaefac68f@google.com> In-Reply-To: From: Rajat Jain Date: Mon, 7 Feb 2022 13:09:03 -0800 Message-ID: Subject: Re: 5.17-rc regression: rmi4 clients cannot deal with asynchronous suspend? (was: X1 Carbon touchpad not resumed) To: Wolfram Sang , Hugh Dickins , Derek Basehore , Rajat Jain , Jarkko Nikula , Dmitry Torokhov , Thorsten Leemhuis , Linux Kernel Mailing List , linux-i2c Cc: "loic.poulain@linaro.org" , Andrew Duggan , vincent.huang@tw.synaptics.com, cheiny@synaptics.com, "Rafael J. Wysocki" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org +Rafael (for any inputs on asynchronous suspend / resume) +Dmitry Torokhov (since no other maintainer of rmi4 in MAINTAINERS file) +loic.poulain@linaro.org (who fixed RMI device hierarchy recently) + Some Synaptics folks (from recent commits - Vincent Huang, Andrew Duggan, Cheiny) On Mon, Feb 7, 2022 at 12:23 PM Wolfram Sang wrote: > > Hello Hugh, > > > Bisection led to 172d931910e1db800f4e71e8ed92281b6f8c6ee2 > > ("i2c: enable async suspend/resume on i2c client devices") > > and reverting that fixes it for me. > > Thank you for the report plus bisection and sorry for the regression! +1, Thanks for the bisection, and apologies for the inconveniences. The problem here seems to be that for some reason, some devices (all connected to rmi4 adapter) failed to resume, but only when asynchronous suspend is enabled (by 172d931910e1): [ 79.221064] rmi4_smbus 6-002c: failed to get SMBus version number! [ 79.265074] rmi4_physical rmi4-00: rmi_driver_reset_handler: Failed to read current IRQ mask. [ 79.308330] rmi4_f01 rmi4-00.fn01: Failed to restore normal operation: -6. [ 79.308335] rmi4_f01 rmi4-00.fn01: Resume failed with code -6. [ 79.308339] rmi4_physical rmi4-00: Failed to suspend functions: -6 [ 79.308342] rmi4_smbus 6-002c: Failed to resume device: -6 [ 79.351967] rmi4_physical rmi4-00: Failed to read irqs, code=-6 A resume failure that only shows up during asynchronous resume, typically means that the device is dependent on some other device to resume first, but this dependency is NOT established in a parent child relationship (which is wrong and needs to be fixed, perhaps using device_add_link()). Thus the kernel may be resuming these devices without first resuming some other device that these devices need to depend on. TBH, I'm not sure how to fix this. The only hint I see is that all of these devices seem to be attached to rmi4 device so perhaps something there? I see 6e4860410b828f recently fixed device hierarchy for rmi4, and so seemingly should have fixed this very issue (as also seen in commit message)? > > I will wait a few days if people come up with a fix. If not, I will > revert the offending commit. While I'll be sad because this means no i2c-client can now resume in parallel and increases resume latency by a *LOT* (hundreds of ms on all Linux systems), I understand that this needs to be done unless someone comes up with a fix. I wanted to confirm that the following patches shall continue to stay? d320ec7acc83 i2c: enable async suspend/resume for i2c adapters 7c5b3c158b38 i2c: designware: Enable async suspend / resume of designware devices Thanks & Best Regards, Rajat > > All the best, > > Wolfram >