From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f175.google.com (mail-pg1-f175.google.com [209.85.215.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 21CFC3AC0FF for ; Wed, 29 Jul 2026 18:24:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785349497; cv=none; b=MKqxt+3RjpB7DxiQWmoT+hcbcZ2eeK5n/8V6tXFEVCNOke0qU+8ESCU8UypbYAD/YuxDYs3hemNy/RjtcfrtG5F/auCq11JnIVmfi9LjgN0oF+c+e6nA8ePccOgmGk6eNLmE7fxK8DZ7jVzYEaAKoxEGUwfVDC8tQ1e2Xc8zC/c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785349497; c=relaxed/simple; bh=zTNi7xN0VsEGLO29yAIGRQnfnEVLmxUXYOvil0odhJA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=BmSdqNvjX+fGAU/J+HOgmjd/H5M22soeXfLcTK2M12elsU6htsIQytzxVLscrIe4+Z8A3exbxxCX4V66GHSP6VzVgKC0AHB3VEDayCOvEZDuiDi1wHQo8FbAp9sh1uUq5iVcTDkwVBv+A2KU3CDijcaxq7MmfP15pURdpEQVOn8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=D3xCUrpS; arc=none smtp.client-ip=209.85.215.175 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="D3xCUrpS" Received: by mail-pg1-f175.google.com with SMTP id 41be03b00d2f7-cbb973e6749so1491310a12.1 for ; Wed, 29 Jul 2026 11:24:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785349492; x=1785954292; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=nWyzhX8fQoAGYKV2tJCLm4P0gv3V6AUTTFTMKZQoknQ=; b=D3xCUrpSnVGOtph0O8e/mxWXnmRc6FBoHNDVIGbPoKAE8jainf7xme9vSulY7vlDdc 9u8IbVo7XtXXSWkO7FOSopqc5YY+FwnhtO5sY2Pq4c6pfQtgFxczXtpvvuB1BzpzdxWe mKt4jktNnzv8htLS6mXPZRPaalx10RA7TRw4Y/xW5MpW8CYjVn3BsrLtg3Rfn4e2L0LE UbuEaLW8XTTEz3LDhiSFBGNrLkf5FMyWWmodO3N7gS1CliZ50A2pubCb3lhL1nSVq2xn AEfdcV4mctS9/I5bCNHysrw+/OGmzq5Fb98vzaLyhfpisjKBmNjGkot1TVOjDNyM+mOS g89A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785349492; x=1785954292; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=nWyzhX8fQoAGYKV2tJCLm4P0gv3V6AUTTFTMKZQoknQ=; b=ZNemgPMTzslaG8qGruyITiK5rqsDEc540PKLW/5xglc81WCIcfrfkiA0/+Om/HRRWF Mo8ntOrGXbpP8PQvSu3eQOqT4otSXlxoYjmrdKiM8lTCcCzm2jB2lGmgiHOGX438obQX l61gD1VO5WCRIIGEBYlW7+jmRZSb70vu5YryotNnNnI4Yx4pQifhMyrwjns6jxmLOY/8 YTxgS/+RgHb8Ig529eTAtCswf3ks2ptnDRSmGStt5PjzdNrXEZ1foBjbnwODJJHjU/o8 5QTHri4SdPFKnYE3aTsZ1z+ptqB0ezvjQQOeYkU7KDhojChW74b8ThxQi2zYhiekfe+w rGOg== X-Forwarded-Encrypted: i=1; AHgh+Ro0Tb2tz5gxp0CoVFHshxScgGRksLbNgRQVjvzTr0tirY+4A79cvpwBQnWJWSgQ2QnYg1R1VCjm8TQdIJQ=@vger.kernel.org X-Gm-Message-State: AOJu0YyT7BGI1/DugTfjHxDlxBvydnTYpy7r5GQ5JZPckC7m2EW8Ubvl zfZrcSF3YGIRtJmNLuVSp+4K4TexXOzx12ht6kOOPg/ow7fke2QjFT49 X-Gm-Gg: AR+sD13XKu52liOANGmyQGQ901B/Nr6EjkdepqdeO4snfiFiYLJ7wJepxJ4ics2FUf6 1QlGxkaVQcpALzhGgCU4ugGIhhTblbFYe5/uwl1SBuphqrWJnI7u2h3j7E4gr3aA7HCn3W7B3iH Kp/fviexKzsocrBkwIeDBwDMP/vAuA20yDjQKJC/R5hDhx6bl+uFuKukaHxGPixX7952s1jx0KA b9Rzs0y0vUuGABBBkqNuR3azkS7Slj1lEg9zt/ZSEOhf2mgQilKP7w0y/kkf+cAaWpoSA+ULLyO 1AzqUYHGr2tTJhpm+v0wQ/VZOjEP5Hh1IwuIqqEC2HM5hQ1on3HAEUkEx4iC5MZP9gMKyJkYY/k PFwi7SVghQvQZHs7hiQLAm/xaaDad0YLSUCxcXGuugVR8jHS4IfCuLXeubBC5UfH3VvWwnYq2FV NhnFbP4WOCHXVzs4pGmFJBbZa9nR3hHzZEmBxNDztgQLRSIg3XoXIlOV9Xb5cHM7ag86k6IhaKs H/SPYA6iA6bQdKvTNYSBZ0KJtax7g== X-Received: by 2002:a05:6a21:7014:b0:3c3:ab31:3d1e with SMTP id adf61e73a8af0-3c8ba615352mr8727032637.56.1785349492297; Wed, 29 Jul 2026 11:24:52 -0700 (PDT) Received: from google.com ([2a00:79e0:2ebe:8:3062:3727:f62a:314c]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-13e7265547bsm10684490c88.7.2026.07.29.11.24.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Jul 2026 11:24:51 -0700 (PDT) Date: Wed, 29 Jul 2026 11:24:48 -0700 From: Dmitry Torokhov To: Greg Kroah-Hartman Cc: Danilo Krummrich , "Rafael J. Wysocki" , driver-core@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH] driver core: introduce PROBE_FORCE_ASYNCHRONOUS Message-ID: References: <2026072729-driller-leggings-e530@gregkh> <2026072717-amicably-tray-4a8b@gregkh> <2026072921-approve-halves-6f4c@gregkh> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2026072921-approve-halves-6f4c@gregkh> On Wed, Jul 29, 2026 at 10:49:16AM +0200, Greg Kroah-Hartman wrote: > On Tue, Jul 28, 2026 at 10:40:29PM -0700, Dmitry Torokhov wrote: > > On Mon, Jul 27, 2026 at 08:25:51AM +0200, Greg Kroah-Hartman wrote: > > > On Sun, Jul 26, 2026 at 10:54:54PM -0700, Dmitry Torokhov wrote: > > > > On Mon, Jul 27, 2026 at 07:40:57AM +0200, Greg Kroah-Hartman wrote: > > > > > On Sun, Jul 26, 2026 at 10:31:41PM -0700, Dmitry Torokhov wrote: > > > > > > Add PROBE_FORCE_ASYNCHRONOUS probe type enum and update > > > > > > driver_allows_async_probing() to allow asynchronous probing for drivers > > > > > > marked with this type. > > > > > > > > > > > > While PROBE_PREFER_ASYNCHRONOUS exists, it represents a temporary opt-in > > > > > > preference. Subsystems that require asynchronous probing (such as slow > > > > > > legacy buses) need a dedicated probe type to guarantee asynchronous > > > > > > execution. > > > > > > > > > > > > Assisted-by: Antigravity:gemini-3.5-flash > > > > > > Signed-off-by: Dmitry Torokhov > > > > > > --- > > > > > > > > > > > > I am planning to rework serio and gameport subsystems to rely on > > > > > > asynchronous probing instead of rolling their own implementations. > > > > > > > > > > What do you mean? Why doesn't the PROBE_PREFER_ASYNCHRONOUS work for > > > > > you for those subsystems? > > > > > > > > It shows the intent. It is not "preference" anymore, it is a "must". If > > > > we ever introduce switch to make probing synchronous for some reason it > > > > should not affect drivers that must be probed asynchronously. > > > > > > I'm sorry, but I don't understand. > > > > PROBE_PREFER_ASYNCHRONOUS says that the driver prefers to be probe > > asynchronously but it can also be probed synchronously if needed. > > > > PROBE_FORCE_ASYNCHRONOUS indicates that the driver *must* be probed > > asynchronously, or the kernel will break. > > > > Currently there is no difference in behavior, but it documents the > > intent. > > > > > And as there's no users for this, we > > > really can't take it until we see those users at the same time :) > > > > I am planning to use it in serio and gameport bus implementations that > > currently roll their own asynchronous registration which is quite ugly. > > Because we have nested serio ports probing *must* be done asynchronously > > or it will deadlock. > > > > I would like to merge the new constant early so that I do not have > > dependency when I am ready to merge input changes. > > > > Below is how it will look like (just a small part of a WIP series). > > Ok, this makes sense, but you need to also add documentation for this > new value to the comment block right above where you defined it :) > > > Wait, in looking at the tree, I don't see how this differs from > "prefer". I don't see how "prefer" can be overloaded to NOT do async > probing. Am I just missing the logic somewhere? As I mentioned, the current behavior for "prefer" and "force" is the same. It is more about documenting expectations/requirements than behavior of the current implementation. Thanks. -- Dmitry