Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756843AbbGFXrd (ORCPT ); Mon, 6 Jul 2015 19:47:33 -0400 Received: from mail-ig0-f181.google.com ([209.85.213.181]:33407 "EHLO mail-ig0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756507AbbGFXlv (ORCPT ); Mon, 6 Jul 2015 19:41:51 -0400 Date: Mon, 6 Jul 2015 16:41:46 -0700 From: Dmitry Torokhov To: Tomeu Vizoso Cc: Greg Kroah-Hartman , "Luis R . Rodriguez" , Tejun Heo , "linux-kernel@vger.kernel.org" , Arjan van de Ven , Rusty Russell , Olof Johansson , Tetsuo Handa Subject: Re: [PATCH 2/8] driver-core: add asynchronous probing support for drivers Message-ID: <20150706234146.GH32140@dtor-ws> References: <1427757610-27882-1-git-send-email-dmitry.torokhov@gmail.com> <1427757610-27882-3-git-send-email-dmitry.torokhov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1970 Lines: 41 On Mon, Jun 01, 2015 at 02:04:01PM +0200, Tomeu Vizoso wrote: > On 29 May 2015 at 15:23, Tomeu Vizoso wrote: > > On 29 May 2015 at 12:48, Tomeu Vizoso wrote: > >> On 31 March 2015 at 01:20, Dmitry Torokhov wrote: > >>> Some devices take a long time when initializing, and not all drivers are > >>> suited to initialize their devices when they are open. For example, > >>> input drivers need to interrogate their devices in order to publish > >>> device's capabilities before userspace will open them. When such drivers > >>> are compiled into kernel they may stall entire kernel initialization. > >>> > >>> This change allows drivers request for their probe functions to be > >>> called asynchronously during driver and device registration (manual > >>> binding is still synchronous). Because async_schedule is used to perform > >>> asynchronous calls module loading will still wait for the probing to > >>> complete. > >> > >> But what about parents? Don't we need to make sure that before probing > >> a device its parent has finished probing already? > > > > Have realized that this is an existing problem that was just made more > > probable by async probe, as before async probing the parent could have > > deferred its probe and then its children would be probed. > > > > Wonder if drivers should be modified to defer its probe if their > > parent isn't probed yet, or if we can codify that in dd.c. > > Also wonder what's the plan regarding USB interfaces requiring that > their parent's lock is taken before probing. Yes, indeed, we need to take paren's lock in async probe too. I'll make a patch. Thanks for spotting this. -- Dmitry -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/