Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp2945429ybz; Mon, 27 Apr 2020 07:23:41 -0700 (PDT) X-Google-Smtp-Source: APiQypJVuBnuqOpE4JtEC15TEhy6bV06Vc6pMCy2HDrfQOYq1FaRmkRhpmHbDW1TrN3Bps6/rpmK X-Received: by 2002:a17:906:4e8a:: with SMTP id v10mr19172530eju.63.1587997421566; Mon, 27 Apr 2020 07:23:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587997421; cv=none; d=google.com; s=arc-20160816; b=o5135Zbge2CBz0le5JsMsrHwVa4kPbwGh+CSMjAT+S/jDoTuogyZOAF6GlF1P95n9v sNkjzAVsmRAQw2Nwze7fwPzoFSx+UKZQPieFyxhVzhjK5Nciq8TxZ+OVlU8vWaEBwyD8 vlpN5QvpZxksTF6QyIEV92ZLeHEeKxaEypeoGK8mPWAeITqS3O43liQyltCGLdpdOQoV UTqRRV6z1lqiCnA6f+V4asb10O3RaqWGUaoUGzh+7dtCPsCqBrImEWQV1ObX139cEeSM kEcfFYsT/JFRAZ3Ra/Ie07hPXG5n8h4Ex/4dkzTdMg9PsUo9OFI+fprqEqSJM1zxAmW9 mnWA== 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=os2wxZikCHk4lPPRcIN9xVfK7EnF40hJmqoZHUeqBOY=; b=rciVjOskF4HVz8ugL2KN5stft1Bpe0HuX+0J5aw0azunOrrNQynQE9epNLTUY/YdYf eVIxhlniY9v2P83OjWLraQ4CZKQtYg04lZBUrwvXF4bzW5uQDExnLPLZUwyK2gXAahWR 1HPFoBculUxnGKOhlfnupzGmG772e77eId8rMqvTANZX71zG3kKM0LQKI/NWEAyI5Yt3 fNiVzdNOiygpweZSEOErWN+3f5etrCtv/nXuhmjj29qVLZpkKa0SlkBj7GXPCIOti/Y9 3XztawTnd33/JCRelaTjrlZX+Q/I3oyzbnPY1mZGpoNLz7dBAl19eEuVHAoFxvsOQBUr BbOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="bWY/9b/u"; 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 lw23si8487686ejb.423.2020.04.27.07.22.59; Mon, 27 Apr 2020 07:23:41 -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="bWY/9b/u"; 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 S1727953AbgD0OVe (ORCPT + 99 others); Mon, 27 Apr 2020 10:21:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727834AbgD0OVe (ORCPT ); Mon, 27 Apr 2020 10:21:34 -0400 Received: from mail-lf1-x141.google.com (mail-lf1-x141.google.com [IPv6:2a00:1450:4864:20::141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3F5CC0610D5; Mon, 27 Apr 2020 07:21:33 -0700 (PDT) Received: by mail-lf1-x141.google.com with SMTP id k28so13970579lfe.10; Mon, 27 Apr 2020 07:21:33 -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=os2wxZikCHk4lPPRcIN9xVfK7EnF40hJmqoZHUeqBOY=; b=bWY/9b/uhSCLnSDkq28VEce1KtybvL18fneE2G2vRwvbKulIH41aQZ4ij8IXun7ndq 6Nc6Ik+S8lETHonsvv/b2Wkbsejp9wjup0Ibuen07M+gOg9aTVvtDOs5DAAj5cDP75eq AUqZkkymzmjuHx8B7zjlR8VMptalKypZOCK/oksi+M+r73Azs5htA1cJIdIEKmjmN2e8 E3UzQO8VnX99fnl1/gq+wbrkLcOicbg6xmD9sfLiE5PjNcTntqhoKHKiF4glt3XheyVO kZhztvFtS7MVPrW409Kom0YT79hNRk/JOQOEyUv4ETSHV8UOgULdft5S4ZRQkW0lm2Bd +Kgg== 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=os2wxZikCHk4lPPRcIN9xVfK7EnF40hJmqoZHUeqBOY=; b=tynDOgAyk3viRiQQx9c2BwsCAhFhXpfujbcRYRzDrOnLwqXlUw37UeoFwV/b55WXzX CJ+zY5+mCrlnatebqgdjo5B0QomR1EB0YDHsiHoVzegJC+kyvgtjlbblhyMHCvSfVGjn 837B57m7NfEhxC8WI0/6DtVUAnTl9h6BaH4YAhHHPKts1ZzT4Fez1aW64hcgmROt8vZL M2dMa0PW/R9Va1pXaQ0V0y27o1fOHXE2FfQmF5SOTqxdFa9lhLfZ7JoBOkrGTHSGmdRT oIDAwHc4gVBxPDxhNcjsaPAGvLYA11WYi1AcVtzP1KKiRZK565tZ0cIelgaZ6yfOanNY 2IDQ== X-Gm-Message-State: AGi0PuaiSY9K3iIOhoC/w4GrmpmawW9ROLMty+4/7H2ubcksWpnf7i/Y Vf4wo2xsZGk2Xa8y0GyGur1BR4df X-Received: by 2002:a19:ae06:: with SMTP id f6mr15508793lfc.97.1587997292185; Mon, 27 Apr 2020 07:21:32 -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 m18sm11287611lfj.10.2020.04.27.07.21.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 27 Apr 2020 07:21:31 -0700 (PDT) Subject: Re: [PATCH v2 1/2] i2c: tegra: Better handle case where CPU0 is busy for a long time To: Thierry Reding , Jon Hunter Cc: Wolfram Sang , Laxman Dewangan , Manikanta Maddireddy , Vidya Sagar , linux-i2c@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org References: <77a31b2f-f525-ba9e-f1ae-2b474465bde4@gmail.com> <470b4de4-e98a-1bdc-049e-6259ad603507@nvidia.com> <79f6560e-dbb5-0ae1-49f8-cf1cd95396ec@nvidia.com> <20200427074837.GC3451400@ulmo> <20200427110033.GC3464906@ulmo> From: Dmitry Osipenko Message-ID: <3a06811c-02dc-ce72-ebef-78c3fc3f4f7c@gmail.com> Date: Mon, 27 Apr 2020 17:21:30 +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: <20200427110033.GC3464906@ulmo> 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 14:00, Thierry Reding пишет: > On Mon, Apr 27, 2020 at 12:52:10PM +0300, Dmitry Osipenko wrote: >> 27.04.2020 10:48, Thierry Reding пишет: >> ... >>>> Maybe but all these other problems appear to have existed for sometime >>>> now. We need to fix all, but for the moment we need to figure out what's >>>> best for v5.7. >>> >>> To me it doesn't sound like we have a good handle on what exactly is >>> going on here and we're mostly just poking around. >>> >>> And even if things weren't working quite properly before, it sounds to >>> me like this patch actually made things worse. >> >> There is a plenty of time to work on the proper fix now. To me it sounds >> like you're giving up on fixing the root of the problem, sorry. > > We're at -rc3 now and I haven't seen any promising progress in the last > week. All the while suspend/resume is now broken on at least one board > and that may end up hiding any other issues that could creep in in the > meantime. > > Furthermore we seem to have a preexisting issue that may very well > interfere with this patch, so I think the cautious thing is to revert > for now and then fix the original issue first. We can always come back > to this once everything is back to normal. > > Also, people are now looking at backporting this to v5.6. Unless we > revert this from v5.7 it may get picked up for backports to other > kernels and then I have to notify stable kernel maintainers that they > shouldn't and they have to back things out again. That's going to cause > a lot of wasted time for a lot of people. > > So, sorry, I disagree. I don't think we have "plenty of time". There is about a month now before the 5.7 release. It's a bit too early to start the panic, IMO :) Jon already proposed a reasonable simple solution: to keep PCIe regulators always-ON. In a longer run we may want to have I2C atomic transfers supported for a late suspend phase. This should fix yours problem and it should go into stable kernels: --- >8 --- diff --git a/drivers/pci/controller/pci-tegra.c b/drivers/pci/controller/pci-tegra.c index 3e64ba6a36a8..6ac76323ca70 100644 --- a/drivers/pci/controller/pci-tegra.c +++ b/drivers/pci/controller/pci-tegra.c @@ -1533,8 +1533,16 @@ static int tegra_pcie_get_resources(struct tegra_pcie *pcie) goto phys_put; } + err = regulator_bulk_enable(pcie->num_supplies, pcie->supplies); + if (err) { + dev_err(dev, "failed to enable regulators: %d\n", err); + goto irq_free; + } + return 0; +irq_free: + free_irq(pcie->irq, pcie); phys_put: if (soc->program_uphy) tegra_pcie_phys_put(pcie); @@ -1545,6 +1553,12 @@ static int tegra_pcie_put_resources(struct tegra_pcie *pcie) { const struct tegra_pcie_soc *soc = pcie->soc; + err = regulator_bulk_disable(pcie->num_supplies, pcie->supplies); + if (err) { + dev_err(pcie->dev, "failed to disable regulators: %d\n", err); + return err; + } + if (pcie->irq > 0) free_irq(pcie->irq, pcie); --- >8 ---