Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp507014ybg; Tue, 9 Jun 2020 06:18:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzTLMt9j79GM8csJc2SMGQZovw6p8fe5V3rUOu7WSkiVaVNE7YDvM8r8Ei+09jvIpORNIIg X-Received: by 2002:a17:906:cd03:: with SMTP id oz3mr26873544ejb.391.1591708739254; Tue, 09 Jun 2020 06:18:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591708739; cv=none; d=google.com; s=arc-20160816; b=pg5oDpta76GhWIrpSMKRnEH/eH0SYaVd7h5ecuVTQevI/bu3pJI8Rs0ydSxe48W289 ae1vfv32tMiiF6+SJI0fHK4ZKDKcDDsOpz3+d45ZGv2kvk3hu7TaD9K6d8EbmkoZViLx 3a93G+JwpKUUNvYoZSD68DT4WyTMxlsRXmFRO4p51JKcK4My/39+nc7lhQsYuqQ7GFor 1RG1zWy+tXtZMudMYkVa109A4AK/B998BxTcBaEXmehloLyiCrO6mV1b6JJlsDsnm920 rpLLVxq/cutxdm4ORiTwimgOJb2jvulypTbB85aCXYnIhQLa8Q/pAm6xuU7KuODYj0fL mGAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=w+hE7EiCr1P4qAcYeogfMesFC2jrB/OkpaHjdzl7Zyw=; b=Rwssc1IfujofUvIQYLF+EBCPGadKOeQTWOTXgbh0cY5Vi9sICyslPPHRQeWb2n+KaX uVgmL1LNXGy/o7tllaf7yvfibm8LuYudHnO7bDTCRCVknUiUDGiUcoGehLUm0Hy8bV4s 8fU2xqDBZ6Kw2+9SWcM8MVO07Pk+IDjXe+HDCT8FdXb3Yte+tsLhr59AdzBY/4UzDPv8 ZAcJNnfq7y7ac4CYNs5gtxv/MenxLb3+2fT4x/AfHl8nX0GdOa82VfblSc+Q+b1VE8go 4zCBmSrP+rBAt723TxZNXtn6Eq2H5aqrFwwoFuOgoHKFFdQsWTWb6umQgkAdztqfOMmb 7OxA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=pxwzHiXu; 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=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z23si10243630ejw.331.2020.06.09.06.18.35; Tue, 09 Jun 2020 06:18:59 -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=@kernel.org header.s=default header.b=pxwzHiXu; 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=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729873AbgFINQT (ORCPT + 99 others); Tue, 9 Jun 2020 09:16:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:33190 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729787AbgFINQD (ORCPT ); Tue, 9 Jun 2020 09:16:03 -0400 Received: from localhost (fw-tnat.cambridge.arm.com [217.140.96.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E788520737; Tue, 9 Jun 2020 13:16:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1591708562; bh=fn5/yXr+s+Db1jJwZ/m79lFUBemiDJfuNnzHg1lYHVg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=pxwzHiXulXcoI9AP55wyvnUrJtLD4+i3+COYPzt2f/GwI7kdH0zz4YBaYDQ6VaPf8 FJ2dTwvOVj+Sb89FgB21g0H+FeIyrOMUo40gTC11xrTCvFt10WyodxdM6fcHbcgM8M gtZWH7SRS1IEnIK1PvET7VXz08RRftT/3FY8pFMU= Date: Tue, 9 Jun 2020 14:16:00 +0100 From: Mark Brown To: Marco Felsch Cc: Andrzej Hajda , Andy Shevchenko , Grant Likely , Saravana Kannan , artem.bityutskiy@linux.intel.com, balbi@kernel.org, fntoth@gmail.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, peter.ujfalusi@ti.com, rafael@kernel.org, kernel-team@android.com, nd , kernel@pengutronix.de Subject: Re: [PATCH v3] driver core: Break infinite loop when deferred probe can't be satisfied Message-ID: <20200609131600.GE4583@sirena.org.uk> References: <20200325032901.29551-1-saravanak@google.com> <20200325125120.GX1922688@smile.fi.intel.com> <295d25de-f01e-26de-02d6-1ac0c149d828@arm.com> <20200326163110.GD1922688@smile.fi.intel.com> <20200608091712.GA28093@pengutronix.de> <437de51b-37e9-d8d1-19c7-137a9265bf45@samsung.com> <20200609064511.7nek2rhk6ebfjaia@pengutronix.de> <20200609121029.nfhgilpu5meoygoa@pengutronix.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="6e7ZaeXHKrTJCxdu" Content-Disposition: inline In-Reply-To: <20200609121029.nfhgilpu5meoygoa@pengutronix.de> X-Cookie: Be careful! Is it classified? User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --6e7ZaeXHKrTJCxdu Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jun 09, 2020 at 02:10:29PM +0200, Marco Felsch wrote: > On 20-06-09 11:27, Andrzej Hajda wrote: > > On 09.06.2020 08:45, Marco Felsch wrote: > > > On 20-06-08 13:11, Andrzej Hajda wrote: > > >> On 08.06.2020 11:17, Marco Felsch wrote: > > >>> On 20-03-26 18:31, Andy Shevchenko wrote: > > >>>> On Thu, Mar 26, 2020 at 03:01:22PM +0000, Grant Likely wrote: > > >>>>> On 25/03/2020 12:51, Andy Shevchenko wrote: > > >>>>>> On Tue, Mar 24, 2020 at 08:29:01PM -0700, Saravana Kannan wrote: > > >>>>>>> On Tue, Mar 24, 2020 at 5:38 AM Andy Shevchenko wrote: Please delete unneeded context from mails when replying. Doing this makes it much easier to find your reply in the message, helping ensure it won't be missed by people scrolling through the irrelevant quoted material. > > I think rule of=20 > > thumb should be "do not expose yourself, until you are ready", which in= =20 > > this case means "do not call component_add, until resources are=20 > > acquired" - ie resource acquisition should be performed in probe. > Hm.. there are is no documentation which forbid this use-case. I thought > that the component framework bind() equals the driver probe() function.. It does, the issue is perhaps more clearly expressed as saying that a driver should acquire whatever resources it needs before starting to make resources available to others, this includes but isn't limited to registering new device nodes. This ensures that the users don't then start trying to use resources and have them torn down underneath them. > > I use=20 > > this approach mainly to avoid multiple deferred re-probes, but it shoul= d=20 > > solve also this issue, so even if there will be solution to "deferred= =20 > > probe issues" in core it would be good to fix imx drivers. > Pls, see my above comments. It is not only the imx driver. Also we > shouldn't expect that driver-developers will follow a rule which is > not written somewhere. If you've got an idea where this should be documented patches welcome! I can't think of anywhere sensibly discoverable to put something off the top of my head. --6e7ZaeXHKrTJCxdu Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl7fi48ACgkQJNaLcl1U h9BAnwf+IQAg6nhT7tQENlmhPWx3FZ4yhQkrwDmGU9T40E0yCtHmLUNcLGsh9kyn DBlX8hGB51Btbnu0B/0A1HZ5WbI3jRLlZKcweyc2lYeBB+EYCE6QcX8Q/PZPcZc3 HkGMw18pACXYKlOxyFg6HF8Jkx+FyU4ArPyIYTCq9ONdKx/QjJHXrYPoAV/M8WX2 /hlGcoLfh2Zo8R/P/9oCbAqsZ0O4O3JZKKxOoUtLynwCymjgDd88rDsBX/FmmUwN k7z3zuvZTHwwv9jwDsqHczyv2IwilmWHT2tYFHOz5wmdiJsngQb5+juzyDdf+B8Z z3yiOvVVzkenkzPDl2y7/qCDurQOxw== =ln+W -----END PGP SIGNATURE----- --6e7ZaeXHKrTJCxdu--