Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp739513ybz; Wed, 22 Apr 2020 07:10:18 -0700 (PDT) X-Google-Smtp-Source: APiQypK3JnrGMlrDCjQ1FFmXlYLPGe+SJDWEnnm1hK3PsqAW7t9+wtDyckeQe6qOcmbuNBJmV3OY X-Received: by 2002:a50:fc0d:: with SMTP id i13mr15526621edr.280.1587564618205; Wed, 22 Apr 2020 07:10:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587564618; cv=none; d=google.com; s=arc-20160816; b=Uq0SL5FIQiZpN7Xyt2jWvGEt1nVLHWVAkeFioxomiIF/b4uy00azIV9IKS7kL4J0hn lCr0UCuKdZnvxj361FXm6X57msU8WeeTEWbOO7YEqpfeyuvqTVICDiUqZsJSfzkIpNvk O6o3Om7PkWPdFdyHYnXaI0WbTRW1WRlbyngQMBDYV1BOzvnwWLrfl9zMJRgCafA7Tya0 8thtYLe2Y8aOaQg5bNxGHDUPqlodi3g8AOPrf3U9Zia4y3ZSteHD1Pn6fLyICwqR7VLz 0/9o5lRyA+RVG4eyEXiGOvFilm4bdqsJb38wm8LWJxgtOLhVmrzPHEDv6gciE6ZKMm1P x5rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=sGFsUbHKcZdDejmr78iBjwIpQAyRNSoI/t3r9/k3A3A=; b=WYWEMjHm/fhNjz00ffYYjtFdN3dx4kjcNx20O5HxrMIqtX8WxqJWHEhNSa8NjQ7ZZg KG7d9e3oP/vqVCodKHJIRCxH5Ce864ENgI3ht5Ia46TImsqT6hDJF45fqg6i1UVkeDoV oqbVBwGj1iYt2VQ3c92lVWsERidOZPSaE/uil76hEuT+u+6JQI832DeGKUeutlfbYywC 0hEOqVsYITjqyTOqWI0DfWehJXRTOrKOT97UJXqiOMLCeA4S4NraTlrf0meTnFkcqD4M Z5TzoOc2+8oPitzg8XbOeckhM6GxPEc62SUe+24r1GX2u28JPTSr+QJN5Tfp6RxUM1i8 l+Xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rPjsmnfI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ox5si3896125ejb.530.2020.04.22.07.09.45; Wed, 22 Apr 2020 07:10:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rPjsmnfI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727011AbgDVOHc (ORCPT + 99 others); Wed, 22 Apr 2020 10:07:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725810AbgDVOHc (ORCPT ); Wed, 22 Apr 2020 10:07:32 -0400 Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 93A6FC03C1A9; Wed, 22 Apr 2020 07:07:30 -0700 (PDT) Received: by mail-lj1-x242.google.com with SMTP id f18so2379182lja.13; Wed, 22 Apr 2020 07:07:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=sGFsUbHKcZdDejmr78iBjwIpQAyRNSoI/t3r9/k3A3A=; b=rPjsmnfI0GJwWjNcs6Rpr3ZBKQl32nRgHSOSMlhg/qNHEu0aCQmCXVRKzV2BpbnY29 VN2W/sxMEpsQU7Cyb3Iq7CuS4xRhobmyj289o686dJt2/TLKo5/d/hlhg64aQyWnwvZX s8irlUQRkAjHjg5ZDKTg9vjpmG4PtUp5wftQdU045JEZVH4UCkzOm7oLn2HvuHDkaUOT BWVO+ARGLNgo+E1RUcs6nU2S9t2/cvg+/P6s+OQPk+lAwipVRvbAIRoFFcbkfFirD0NG w4hDVnQ/sYmVl9L26HpTKP4wjHVvLuiLd+7YlkcmWXks+WNp5+3GfHspjCdYzE1QWPbr +jcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=sGFsUbHKcZdDejmr78iBjwIpQAyRNSoI/t3r9/k3A3A=; b=DK/gt9KgNDZTFV4Ta9DF6styz57Babx1Knfx6XOtL771Zp8W9IZWiigWHwyqJHJukm endHB8zVhsl6vepDA4p1No8Qz6e3/Duon/nIQ+SXNe1511z3gLNgFHOccLtjKIsqDc2/ ElWPNxv4X+HqoOFX094s2njWVmdWKTaVk0tbQX3AUebdcM7WA9d3UDFEwwT2jI45WkHt 3hnyfDc9WqK0GKtAXNngHExdRMdYCSNFauMF/XoKeYbJLoVsI8a73CSRXCPZbDRh8N78 DgMpqsiKZ5yqC+zWTp4/rPawgIlm7j9TjFAoCjjATQK6ykqO+w5yoDEgDhmbxz/fQdpF OOkA== X-Gm-Message-State: AGi0PuYiaQpp6QUlK+f1/g6IPG1hm7x/esNNnwhjd/8DVfLpu88B9nFa lxwdgiyvsa+c1T2WOkB1ZQDd3prk X-Received: by 2002:a2e:87d9:: with SMTP id v25mr11704447ljj.241.1587564448475; Wed, 22 Apr 2020 07:07:28 -0700 (PDT) Received: from [192.168.2.145] (ppp91-78-208-152.pppoe.mtu-net.ru. [91.78.208.152]) by smtp.googlemail.com with ESMTPSA id a26sm4773980lfl.66.2020.04.22.07.07.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 Apr 2020 07:07:27 -0700 (PDT) Subject: Re: [PATCH v2 1/2] i2c: tegra: Better handle case where CPU0 is busy for a long time To: Jon Hunter , Thierry Reding , Laxman Dewangan , Wolfram Sang , Manikanta Maddireddy , Vidya Sagar Cc: linux-i2c@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org References: <20200324191217.1829-1-digetx@gmail.com> <20200324191217.1829-2-digetx@gmail.com> <1e259e22-c300-663a-e537-18d854e0f478@nvidia.com> <8cd085e1-f9fd-6ec0-9f7a-d5463f176a63@nvidia.com> <6f07e5c8-7916-7ea2-2fe7-d05f8f011471@nvidia.com> <77a31b2f-f525-ba9e-f1ae-2b474465bde4@gmail.com> <470b4de4-e98a-1bdc-049e-6259ad603507@nvidia.com> From: Dmitry Osipenko Message-ID: Date: Wed, 22 Apr 2020 17:07:26 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: <470b4de4-e98a-1bdc-049e-6259ad603507@nvidia.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 22.04.2020 16:59, Jon Hunter пишет: > > On 22/04/2020 14:40, Dmitry Osipenko wrote: >> 21.04.2020 22:42, Jon Hunter пишет: >>> >>> On 21/04/2020 16:08, Dmitry Osipenko wrote: >>>> 21.04.2020 17:40, Jon Hunter пишет: >>>>> >>>>> On 21/04/2020 14:25, Dmitry Osipenko wrote: >>>>>> 21.04.2020 12:49, Jon Hunter пишет: >>>>>> ... >>>>>>> I can try the above, but I agree it would be best to avoid messing with >>>>>>> the suspend levels if possible. >>>>>> >>>>>> Will be awesome if you could try it and report back the result. >>>>>> >>>>> >>>>> I gave it a try but suspend still fails. >>>> >>>> Perhaps the RPM's -EACCES is returned from here: >>>> >>>> https://elixir.free-electrons.com/linux/v5.7-rc2/source/drivers/base/power/runtime.c#L723 >>>> >>>> Which suggests that I2C is accessed after being suspended. I guess the >>>> PCIe driver suspends after the I2C and somehow my change affected the >>>> suspension order, although not sure how. >>>> >>>> Jon, could you please try to enable PM logging and post the log? Please >>>> also post log of the working kernel version, so that we could compare >>>> the PM sequence. >>>> >>>> Something like this should enable the logging: "echo 1 > >>>> /sys/power/pm_trace" + there is RPM tracing. >>> >>> Unfortunately, after enabling that I don't any output and so no help there. >> >> 1. I now tried to check the pm_trace myself and found that it's >> available only on X86, my bad. >> >> 2. Jon, could you please clarify what exactly you were trying to test? >> >> 3. Is it only the Cardhu board that is affected by this problem? >> >> 4. Could you please try to add this to the kernel's cmdline and post the >> logs: >> >> tp_printk >> trace_event=rpm_suspend,rpm_resume,rpm_usage,rpm_idle,rpm_return_int > > > So I think that part of the problem already existed prior to these > patches. Without your patches I see ... > > [ 59.543528] tegra-i2c 7000d000.i2c: i2c transfer timed out Does this I2C timeout happen with my patches? Could you please post full logs of an older and the recent kernel versions? > [ 59.549036] vdd_sata,avdd_plle: failed to disable > > [ 59.553778] Failed to disable avdd-plle: -110 > > [ 59.558150] tegra-pcie 3000.pcie: failed to disable regulators: -110 > > > However, now with your patches the i2c is failing to resume and this > breaks system suspend completely for Tegra30. So far this is the only > board that appears to break. > > So the above issue needs to be fixed and I will chat to Thierry about this. Okay