From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B1E92C282DE for ; Mon, 8 Apr 2019 03:44:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7F1EC208E3 for ; Mon, 8 Apr 2019 03:44:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726464AbfDHDoY (ORCPT ); Sun, 7 Apr 2019 23:44:24 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:40160 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726349AbfDHDoX (ORCPT ); Sun, 7 Apr 2019 23:44:23 -0400 Received: from mail-qt1-f198.google.com ([209.85.160.198]) by youngberry.canonical.com with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.76) (envelope-from ) id 1hDLCm-0005XS-Dd for linux-acpi@vger.kernel.org; Mon, 08 Apr 2019 03:44:20 +0000 Received: by mail-qt1-f198.google.com with SMTP id k13so11499751qtc.23 for ; Sun, 07 Apr 2019 20:44:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=2JIaDBayuL3uBjV+gAUXNn7OjCmpE8H2R4sqnbLcGE4=; b=gh3N0DZusqwOv+jj83O3+NGArtyoLqOn+sFz4SWWNsnCyJa1jzOT+oNiIg61jS063C LpWkWSkaOxmk9k8WugWeum4T2gTY5cZi8EbVKGwb1MAfWtfevex9EKUch3n/KUno+qK0 gtGJkLcy1FN1HPm1TiCT8LH72cEVndnC+DR4S5ii3GrHDNg+yPqMme0/LijN2WDKTO9t K5JEeZEIqapHYqRFpadccfx/UDUj5OQKWLuAb+Z5c+zO62RxP0WNZk/7JttjGpWUmLjo QcntdV2bIBUIvRmPJpG33lvLYd6B4I7IzU4f0L4bDKchmiAqu1nZ/MPefkoUk4CYp7z7 xr1g== X-Gm-Message-State: APjAAAULmi0iD03h59qgc+ZIde0HolsQ0Sl0N9ix7Ia5G5sFAHN+xt/J UcYEOgAXHw2XPBB6XQxZHKGZhhBKW1WMFWbkG9eteRylOx8KGKpVV1pr5tJcx8Mto3Jpia1aFw/ RR4c/gzbztjOEKMX+dM+6/hHMk2t6OHdpxElQzQ0= X-Received: by 2002:ac8:27b0:: with SMTP id w45mr22444507qtw.341.1554695059561; Sun, 07 Apr 2019 20:44:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqy0gWZ8l9nizdbXOcxT+d8cxm7PyDkpnIXppndq0PQ7+geFE2V6DklqMKly2eMmC48Krahxtw== X-Received: by 2002:ac8:27b0:: with SMTP id w45mr22444492qtw.341.1554695059296; Sun, 07 Apr 2019 20:44:19 -0700 (PDT) Received: from [10.101.46.46] (61-220-137-37.HINET-IP.hinet.net. [61.220.137.37]) by smtp.gmail.com with ESMTPSA id v8sm17730005qtc.69.2019.04.07.20.44.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 07 Apr 2019 20:44:18 -0700 (PDT) Content-Type: text/plain; charset="UTF-8"; delsp="yes"; format="flowed" Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.8\)) Subject: Re: [PATCH] ACPI / LPSS: Don't skip late system PM ops for hibernate on BYT/CHT From: Kai Heng Feng In-Reply-To: Date: Mon, 8 Apr 2019 11:44:11 +0800 Cc: Hans de Goede , "rjw@rjwysocki.net" , "lenb@kernel.org" , "linux-acpi@vger.kernel.org" , "linux-kernel@vger.kernel.org" Content-Transfer-Encoding: 8bit Message-Id: References: <20190403054352.30120-1-kai.heng.feng@canonical.com> To: "Robert R. Howell" X-Mailer: Apple Mail (2.3445.104.8) Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org Message-ID: <20190408034411._GhRhaL6YJb3nGrWel_gENMXAwJyhCkh43PgvxzPA4k@z> at 4:58 AM, Robert R. Howell wrote: > On 4/3/19 2:54 AM, Hans de Goede wrote: > >> Hi, >> >> On 03-04-19 07:43, Kai-Heng Feng wrote: >>> i2c-designware-platdrv fails to work after the system restored from >>> hibernation: >>> [ 272.775692] i2c_designware 80860F41:00: Unknown Synopsys component >>> type: 0xffffffff >>> >>> Commit 48402cee6889 ("ACPI / LPSS: Resume BYT/CHT I2C controllers from >>> resume_noirq") makes acpi_lpss_{suspend_late,resume_early}() bail early >>> on BYT/CHT as resume_from_noirq is set. This means dw_i2c_plat_resume() >>> doesn't gets called by acpi_lpss_resume_early(), and this causes the >>> issue. > ... >> The ordering problem fixed by commit 48402cee6889 can hit hibernate too, >> so I think it would be better to do this instead to fix this problem: >> >> diff --git a/drivers/acpi/acpi_lpss.c b/drivers/acpi/acpi_lpss.c >> index 1e2a10a06b9d..cf768608437e 100644 > ... >> If people affected by the problem can give my version of the fix a test, >> then that would be great. >> >> Regards, >> >> Hans > > I did try applying your (Hans') patch to a 5.0.0 and a 5.1-rc3 kernel, > instead of what I had > been doing previously, which was reverting commit 02e45646d53b. I tested > it on an ASUS T100TA > and unfortunately with both kernels after resume from hibernation I still > get errors like those > listed below, and sound no longer works. I also tried applying the patch > from Kai-Heng Feng > (instead of Hans' patch or my revert) on both kernels and again in both > cases I get these same errors. Hmm, Hans’ works for me, as acpi_lpss_resume_noirq() calls acpi_lpss_do_resume_early() for S4. > > In contrast, on the 5.0.0 kernel when I revert 02e45646d53b, the problem > is fixed. Because > of changes in adjacent code in 5.1-rc3, I haven't yet found a way to > merge the new code > and the 02e45646d53b revert without causing worse problems. But that's > probably because > I don't really understand the details of that code. > > [ 120.690428] i2c_designware 80860F41:01: timeout waiting for bus ready > [ 120.690442] rt5640 i2c-10EC5640:00: Failed to write 13d = 3600: -110 > [ 120.712860] i2c_designware 80860F41:01: timeout waiting for bus ready > [ 120.737389] i2c_designware 80860F41:01: timeout waiting for bus ready > [ 120.759657] i2c_designware 80860F41:01: timeout waiting for bus ready > [ 120.781797] i2c_designware 80860F41:01: timeout waiting for bus ready > [ 120.804153] i2c_designware 80860F41:01: timeout waiting for bus ready > [ 120.826467] i2c_designware 80860F41:01: timeout waiting for bus ready > [ 121.965886] i2c_designware 80860F41:01: timeout in disabling adapter > ..... > [ 132.782634] i2c_designware 80860F41:01: controller timed out > [ 133.806538] i2c_designware 80860F41:01: controller timed out > [ 134.830991] i2c_designware 80860F41:01: controller timed out > [ 135.855183] i2c_designware 80860F41:01: controller timed out > > Let me know if I can do any other testing to help. Is it possible to attach full dmesg? Thanks. Kai-Heng > > Bob Howell