Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp4728946imm; Mon, 14 May 2018 11:59:38 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrY51MuctWIcQ1R9e3Mw/QQcz3Opy9lhq5ZbUjcO0/Ox1iqFOXuT0pvchuHk6x/iIxKaRc1 X-Received: by 2002:a62:981d:: with SMTP id q29-v6mr11709821pfd.65.1526324378837; Mon, 14 May 2018 11:59:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526324378; cv=none; d=google.com; s=arc-20160816; b=KgOHl3NkSxSdEZtn1zLTjuziYgWmLXEk/+zxXngUo1pyfx0lEA6Dk1tarbfDf8Mlji EJ1w1SNPSA4QCQA5SlZ+EqA9hHb88wBtgsqL62Epn3Och3rYL2jKm6PtfsS1KGIAaWsm C3fQxEM3znIjimqqSE5WYmv9T6umVFSqelI4kz3zIkvOJ7mAampD6GcD7Y98dh5z/1SQ ZORtjoVS8NZ6Plu0jhmCE20spRcSVBgMLuXx3Hb+Ib3aYzpiID7dQB7epZTwshm5XAJz wQFNm+9x4M9ysF7z3oJbTxv3bVs5LnNFXTzuXrJhck9IFTZEqF6BpaZfzML8jj1sN3Xd 29sw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=NvTrqQ4tjeDJmdAd5KKo8t93yH0BH49UBX9t7lHcJmk=; b=RHJR159ApsBqSuUFq3CgwBz0noBkqW9VhhQLGY6+7GJaMBmj3PKo+dad1lzbFyqG/t yUEuZvKmwF2xdE2aHOaS7LMuMovBYcwfaLrXuInODvgMvfLA9/lIL+507lqP/MvEYz+z 25T3chf3iqnz/Aq5vRstwG8gA7OFUVje7c1kMUzTSLjOcgFoVxwGJd62p8rRfLxhuoNt FMeomLAiohnFxUSK1aV7e+vhdAEA08pn74VV955VwabevwCs7coiiLf7bY5SA7npZNav NsT5So52B/l13rDUXemueulcfLBaqaao2VPGq6idf4h//nOAXOXgk+yXOmNMwqJJXQCf 07Fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=K42uTyQS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j1-v6si6776503pga.462.2018.05.14.11.59.24; Mon, 14 May 2018 11:59:38 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=K42uTyQS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752159AbeENS5V (ORCPT + 99 others); Mon, 14 May 2018 14:57:21 -0400 Received: from mail-it0-f66.google.com ([209.85.214.66]:54829 "EHLO mail-it0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752011AbeENS5T (ORCPT ); Mon, 14 May 2018 14:57:19 -0400 Received: by mail-it0-f66.google.com with SMTP id z6-v6so12912553iti.4 for ; Mon, 14 May 2018 11:57:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=NvTrqQ4tjeDJmdAd5KKo8t93yH0BH49UBX9t7lHcJmk=; b=K42uTyQSKw23Z3tpfC4OiA8kL6M54HzDcOCrOrUckvjz/XaHUZCCS5PeUMgOxgXcM0 VvRSQkvY2xxQFBoWrezrXDUbbZpbc2BmoOyNfooxW7o1as6paxStluyWCcpb2Idq8Dk1 rQDQN1uV4jUf+ZzpISY4AfR/NILWJq2OPU+fo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=NvTrqQ4tjeDJmdAd5KKo8t93yH0BH49UBX9t7lHcJmk=; b=pwa4hCp+DMNhCIVsiaB74H9arSa4gjyFuSm32v0AnPWV8O4sB6Ch8rjAFZyg1CNfQ0 aZ5zeXC5OrL0EUjYf8526ek/krpo+6u2OF3qTsrz4WPAIyiaX6mirb4bd3aHg9xb6qz0 f+s65an4155guJBmABbSTs58M8vg2f6DykL63KefbXM4/OHnNL2L+IfXDuwk/+uRUS+R 9DiV01JJIT7Ys7572c9tGdZ17BYGhum/vvI7xFhVzZ1AqWjqtV1ZYHtrdDSkfLznTnTy aUEvFFpgc4iOlebxIQlwo2nSmfJuHVXEoUa+ddCW1QJ45iaPYyU1I1rtFN44YeLxsYva AVlQ== X-Gm-Message-State: ALKqPwdodKGtaT5JYV+4RBov+VUm060bbS9KZpiFjuqyM4Ss/WulQqbg JC4r2FuBQlJPKwRUXTlyKgjmLfSeyDNMvt9bDaUIjQ== X-Received: by 2002:a6b:c9d8:: with SMTP id z207-v6mr12358272iof.266.1526324238710; Mon, 14 May 2018 11:57:18 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a02:7347:0:0:0:0:0 with HTTP; Mon, 14 May 2018 11:57:17 -0700 (PDT) In-Reply-To: <20180514151907.GK98604@atomide.com> References: <1524732790-2234-1-git-send-email-ulf.hansson@linaro.org> <1524732790-2234-8-git-send-email-ulf.hansson@linaro.org> <20180514151907.GK98604@atomide.com> From: Ulf Hansson Date: Mon, 14 May 2018 20:57:17 +0200 Message-ID: Subject: Re: [PATCH 07/11] driver core: Respect all error codes from dev_pm_domain_attach() To: Tony Lindgren Cc: "Rafael J . Wysocki" , Greg Kroah-Hartman , Linux PM , Vincent Guittot , Geert Uytterhoeven , Kevin Hilman , Vinod Koul , Viresh Kumar , Wolfram Sang , Pierre-Louis Bossart , Russell King , Mark Brown , Linux ARM , Sanyog Kale , Linux Kernel Mailing List , linux-omap Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 14 May 2018 at 17:19, Tony Lindgren wrote: > Ulf, > > * Ulf Hansson [180426 09:01]: >> The limitation of being able to check only for -EPROBE_DEFER from >> dev_pm_domain_attach() has been removed. Hence let's respect all error >> codes and bail out accordingly. >> >> Cc: Greg Kroah-Hartman >> Signed-off-by: Ulf Hansson >> --- >> drivers/base/platform.c | 17 ++++++++--------- >> 1 file changed, 8 insertions(+), 9 deletions(-) >> >> diff --git a/drivers/base/platform.c b/drivers/base/platform.c >> index 8075ddc..9460139 100644 >> --- a/drivers/base/platform.c >> +++ b/drivers/base/platform.c >> @@ -572,17 +572,16 @@ static int platform_drv_probe(struct device *_dev) >> return ret; >> >> ret = dev_pm_domain_attach(_dev, true); >> - if (ret != -EPROBE_DEFER) { >> - if (drv->probe) { >> - ret = drv->probe(dev); >> - if (ret) >> - dev_pm_domain_detach(_dev, true); >> - } else { >> - /* don't fail if just dev_pm_domain_attach failed */ >> - ret = 0; >> - } >> + if (ret) >> + goto out; >> + >> + if (drv->probe) { >> + ret = drv->probe(dev); >> + if (ret) >> + dev_pm_domain_detach(_dev, true); >> } >> >> +out: >> if (drv->prevent_deferred_probe && ret == -EPROBE_DEFER) { >> dev_warn(_dev, "probe deferral not supported\n"); >> ret = -ENXIO; >> -- > > Looks like this causes Linux next to not boot for me with device > probes failing with error -17. So that's at least omaps, looks > like kernelci has others failing too. Yep, problem also reported for some Exynos5 platforms. Omap suffers from the similar problem, because of its SoC specific way of attaching devices to PM domains. > > Reverting for 8c123c14bbba ("driver core: Respect all error codes from > dev_pm_domain_attach()") fixes the issue for me. > > Sounds like something is missing, any ideas? This should solve the problem: https://patchwork.kernel.org/patch/10398597/ Kind regards Uffe