From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Aditya Garg <gargaditya08@live.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Danilo Krummrich <dakr@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Masami Hiramatsu (Google)" <mhiramat@kernel.org>,
Dirk Behme <dirk.behme@de.bosch.com>,
"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [PATCH v3 1/3] Revert "drivers: core: synchronize really_probe() and dev_uevent()"
Date: Fri, 20 Mar 2026 00:24:02 -0700 [thread overview]
Message-ID: <abzxGvEOqtoTiya4@google.com> (raw)
In-Reply-To: <75F8FAD9-964A-4F87-8D71-AEF166D9E10D@live.com>
On Fri, Mar 20, 2026 at 06:16:33AM +0000, Aditya Garg wrote:
>
>
> > On 11 Mar 2025, at 10:54 AM, Dmitry Torokhov <dmitry.torokhov@gmail.com> wrote:
> >
> > This reverts commit c0a40097f0bc81deafc15f9195d1fb54595cd6d0.
> >
> > Probing a device can take arbitrary long time. In the field we observed
> > that, for example, probing a bad micro-SD cards in an external USB card
> > reader (or maybe cards were good but cables were flaky) sometimes takes
> > longer than 2 minutes due to multiple retries at various levels of the
> > stack. We can not block uevent_show() method for that long because udev
> > is reading that attribute very often and that blocks udev and interferes
> > with booting of the system.
> >
> > The change that introduced locking was concerned with dev_uevent()
> > racing with unbinding the driver. However we can handle it without
> > locking (which will be done in subsequent patch).
> >
> > There was also claim that synchronization with probe() is needed to
> > properly load USB drivers, however this is a red herring: the change
> > adding the lock was introduced in May of last year and USB loading and
> > probing worked properly for many years before that.
> >
> > Revert the harmful locking.
> >
> > Cc: stable@vger.kernel.org
> > Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> > ---
>
> Hi
>
> For sometime users of the appletbdrm driver used for Touch Bar support
> on T2 Macs
> (https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/gpu/drm/tiny/appletbdrm.c?h=v7.0-rc4)
> have been facing a regression that caused the Touch Bar to no longer
> work on resume. A person tried to bisect and this commit was found to
> be the reason.
>
> The person has tried to explain the whole situation in this GitHub
> issue:
> https://github.com/t2linux/wiki/issues/635#issuecomment-4092907335
>
> And this seems to be the most plausible explanation:
> https://github.com/t2linux/wiki/issues/635#issuecomment-4071720148
Hi,
I believe the person who did the root cause analysis told exactly how to
fix the issue. Your driver should not assume that the device is in given
configuration and if the device needs to be transitioned into particular
configuration which given timing it is on your driver to implement it.
It appears you have rule that triggers on "ADD" event for the device to
not only load the driver, but also toggle the configuration, and relied
on it be executed only after initial probe (that sets configuration 0)
is done. This is not supported and should not be expected to work. There
are dedicated "bind" and "unbind" events to signal when a device binds
or unbinds from a driver, but again, the proper fix is actually in your
driver's probe to configure the device properly.
Thanks.
--
Dmitry
prev parent reply other threads:[~2026-03-20 7:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-11 5:24 [PATCH v3 1/3] Revert "drivers: core: synchronize really_probe() and dev_uevent()" Dmitry Torokhov
2025-04-03 4:08 ` Masami Hiramatsu
2026-03-20 6:16 ` Aditya Garg
2026-03-20 7:24 ` Dmitry Torokhov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=abzxGvEOqtoTiya4@google.com \
--to=dmitry.torokhov@gmail.com \
--cc=dakr@kernel.org \
--cc=dirk.behme@de.bosch.com \
--cc=gargaditya08@live.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=rafael@kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox