Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp2938469ybz; Mon, 27 Apr 2020 07:16:48 -0700 (PDT) X-Google-Smtp-Source: APiQypIkjleLO91NSsOl9A3fEmBSq8h3LLZkz+T5NhvUYWtxjQ2wXe13K5uOelrXydG8vAV+jPMq X-Received: by 2002:a05:6402:22ea:: with SMTP id dn10mr18348938edb.70.1587997008283; Mon, 27 Apr 2020 07:16:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587997008; cv=none; d=google.com; s=arc-20160816; b=vK9hlGVUfJsT4SXdOt3v7gFcz0VcTsXew/ksg4QXbASj+YDoxsytzVeXwU6DB4HILe jEnG+hzZf1IuUq5MC1suDlLD2BBruZfwv8LETVit/hnWYHQey076hHxQ9ESs3I35rbP0 WEQdu6kwcULUOku14bddGRUvMEEA+nW7EsgMhY+PRhhjnIDVA+JlZ2L1Ic9m2KNrzKch kmKfe17ZcWu+P8k8YPFPWJF9hBSw0b6MvI1aKJ38/vTejHKCDMZ/qr3bC5ZuLKNNKvO5 LoBUwap2kllgksX5beVBqyVAJuhmzM/zwblYRwOTbcWN8tT+pkdqx5Nt+WdUTSVX5v+y JTRQ== 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:references:cc:to:from:subject:dkim-signature; bh=c8AQHsY8ZQ/Cy5ox+15xpqyPDPV+NimT+CSsM7t46b8=; b=Ed3LE+t4ILtqj8mEU29+5r2bHWV7R5+muXv88Y/gNIvp/1tycptc9utTF6BfyshsRz gLXib7APVL84RQrj5aMWq4o1I+y5mhhw7Bx4ELzS6U3FXKJfLxaUR6n4JXzoDWAy/RBS SGIe8G174QSKaLOtx8y4VKub+zWiHkmuvCAOWzlZ/fBfOMX72n7JqEvJEv2LK+k8rpM9 Y5SOCKpPs2O39i7wPEgvGQQzT6u6Bis9+H9ZnorBu0k6SZ5YSE21ac9ip6wRV4i3Yaj/ VIf/dE1L1YTLOGAJeki4RoKvW5bz3oeAoIOglQpxUmAbHnX9ghjeoIGTs4KGdU4HFd2w OUkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=jKmNNWFS; 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 a23si2398805edy.59.2020.04.27.07.16.17; Mon, 27 Apr 2020 07:16:48 -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=jKmNNWFS; 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 S1727801AbgD0OOH (ORCPT + 99 others); Mon, 27 Apr 2020 10:14:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59986 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727022AbgD0OOH (ORCPT ); Mon, 27 Apr 2020 10:14:07 -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 0CD9FC0610D5; Mon, 27 Apr 2020 07:14:01 -0700 (PDT) Received: by mail-lj1-x242.google.com with SMTP id e25so17749316ljg.5; Mon, 27 Apr 2020 07:14:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=c8AQHsY8ZQ/Cy5ox+15xpqyPDPV+NimT+CSsM7t46b8=; b=jKmNNWFSSc0A+hrf0/miuC1saeKkdkKxFkjuCaz6KszE1dWOL4SG/dtwnvNsiKPGG9 Fw/q7Pc7C/NdJboPhNNix+UpX+vUFdNI7js7qd9uzv1Xg6171itAIkCHhZyT6JktIhMg ITdaJO+B2uRDYaD2+ns1L1swGRHFL71FHbdenW62hS2dZMnMS49P8sdDkLIukLXh3x0F nAofB8q3yhkDjR3siVOTyYPp4wkt/bXIN4kpUFwCgU9H8UCOTqHF+TCGQeIvEbP+/n9H W/vU/+Eu7rNzHUJC2O6nscxUYK6R0vG4xqqUSAOI4e1FwHtLWe7eBZ9eGEnd2CZC2iG7 ji4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:from:to:cc:references:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=c8AQHsY8ZQ/Cy5ox+15xpqyPDPV+NimT+CSsM7t46b8=; b=bbWXCHhR167Weqgtl+IDSP1xLsYRQEdRdFJMfv3XeeWmEBjETrn/ZOpEyb+8bC0QkQ lbenuxxp8FoBJNH4vaedWY4JAlpLO+2GPbFaP39f7idDTpzdJFwznPp47CzY6YlizgkE 6X5DKBrCQUs9KOQqNTPNP/wIXEl3HbC1cNTyyYglIdX7mV6Rh0FPgHQ8abKxuZKMrcyb EU8gWWfluxwr1PbL+dPdQwrk+zY0O9+x+sNinqVOcMWJZhHECRiG3CkKZBuHK25RYOVW XTzqehyfCnJbOPmCoeGwNrubTavg98Z0gkcVGcGKzx3eunBVeRpsGJ33CFWkKxhWxtn/ H+9Q== X-Gm-Message-State: AGi0PuZJgxvM6HoPbDh4ls5y1kkmU2BMv8tAwPJ0J27Xay9MFsOUBirp PTxY+gCtbf9dBGxrBUeaK05GCXfh X-Received: by 2002:a2e:760c:: with SMTP id r12mr13970197ljc.139.1587996839234; Mon, 27 Apr 2020 07:13:59 -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 d13sm5568421ljc.14.2020.04.27.07.13.56 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 27 Apr 2020 07:13:57 -0700 (PDT) Subject: Re: [PATCH v2 1/2] i2c: tegra: Better handle case where CPU0 is busy for a long time From: Dmitry Osipenko 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> Message-ID: <5fc71168-e4ac-11f6-dbf1-e80f4fae8d1a@gmail.com> Date: Mon, 27 Apr 2020 17:13:56 +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: 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 27.04.2020 15:46, Dmitry Osipenko пишет: > 23.04.2020 13:56, Jon Hunter пишет: >>>> 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 >>>> [ 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 >>> Does this I2C timeout happen with my patches? Could you please post full >>> logs of an older and the recent kernel versions? >> I believe that it does, but I need to check. >> > > Jon, could you please confirm that you're seeing those regulator-disable > errors with my patch? I don't see those errors in yours original log [1]. > > [1] > https://lore.kernel.org/lkml/1e259e22-c300-663a-e537-18d854e0f478@nvidia.com/ > > Again, could you please post the *full* logs? > > If regulator's disabling was "failing" before without my patch because > of the I2C interrupt being force-disabled during of NOIRQ phase, and now > regulator's disabling succeeds with my patch because IRQ is manually > handled after the timeout, then this could be bad. It means that > regulator was actually getting disabled, but I2C driver was timing out > because interrupt couldn't be handled in NOIRQ phase, which should > result in a dead PCIe on a resume from suspend since regulator's core > thinks that regulator is enabled (I2C said it failed to disable), while > it is actually disabled. > > Do you have anything plugged into the PCIe slot in yours testing farm? > It wouldn't surprise me if the plugged card isn't functional after > resume from suspend on a stable kernels. > I actually now see that interrupt is not allowed to be enabled during the NOIRQ phase: https://elixir.bootlin.com/linux/v5.7-rc3/source/kernel/irq/manage.c#L640 it should be worthwhile to turn it into a WARN_ON.