From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Mario Limonciello <superm1@kernel.org>
Cc: mario.limonciello@amd.com, andreas.noever@gmail.com,
michael.jamet@intel.com, westeri@kernel.org,
YehezkelShB@gmail.com, rajat.khandelwal@intel.com,
mika.westerberg@linux.intel.com, linux-usb@vger.kernel.org,
kim.lindberger@gmail.com, linux@lunaa.ch,
Sasha Levin <sashal@kernel.org>,
stable@vger.kernel.org, Alyssa Ross <hi@alyssa.is>,
regressions@lists.linux.dev
Subject: Re: [REGRESSION] thunderbolt: Fix a logic error in wake on connect
Date: Mon, 7 Jul 2025 09:57:13 +0200 [thread overview]
Message-ID: <2025070737-charbroil-imply-7b5e@gregkh> (raw)
In-Reply-To: <51d5393c-d0e1-4f35-bed0-16c7ce40a8a8@kernel.org>
On Sun, Jul 06, 2025 at 10:46:53AM -0400, Mario Limonciello wrote:
> On 6/30/25 07:32, Alyssa Ross wrote:
> > Alyssa Ross <hi@alyssa.is> writes:
> >
> > > On Fri, Apr 11, 2025 at 10:14:44AM -0500, Mario Limonciello wrote:
> > > > From: Mario Limonciello <mario.limonciello@amd.com>
> > > >
> > > > commit a5cfc9d65879c ("thunderbolt: Add wake on connect/disconnect
> > > > on USB4 ports") introduced a sysfs file to control wake up policy
> > > > for a given USB4 port that defaulted to disabled.
> > > >
> > > > However when testing commit 4bfeea6ec1c02 ("thunderbolt: Use wake
> > > > on connect and disconnect over suspend") I found that it was working
> > > > even without making changes to the power/wakeup file (which defaults
> > > > to disabled). This is because of a logic error doing a bitwise or
> > > > of the wake-on-connect flag with device_may_wakeup() which should
> > > > have been a logical AND.
> > > >
> > > > Adjust the logic so that policy is only applied when wakeup is
> > > > actually enabled.
> > > >
> > > > Fixes: a5cfc9d65879c ("thunderbolt: Add wake on connect/disconnect on USB4 ports")
> > > > Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
> > >
> > > Hi! There have been a couple of reports of a Thunderbolt regression in
> > > recent stable kernels, and one reporter has now bisected it to this
> > > change:
> > >
> > > • https://bugzilla.kernel.org/show_bug.cgi?id=220284
> > > • https://github.com/NixOS/nixpkgs/issues/420730
> > >
> > > Both reporters are CCed, and say it starts working after the module is
> > > reloaded.
> > >
> > > Link: https://lore.kernel.org/r/bug-220284-208809@https.bugzilla.kernel.org%2F/
> > > (for regzbot)
> >
> > Apparently[1] fixed by the first linked patch below, which is currently in
> > the Thunderbolt tree waiting to be pulled into the USB tree.
> >
> > #regzbot monitor: https://lore.kernel.org/linux-usb/20250619213840.2388646-1-superm1@kernel.org/
> > #regzbot monitor: https://lore.kernel.org/linux-usb/20250626154009.GK2824380@black.fi.intel.com/
> >
> > [1]: https://github.com/NixOS/nixpkgs/issues/420730#issuecomment-3018563631
>
> Hey Greg,
>
> Can you pick up the pull request from Mika from a week and a half ago with
> this fix for the next 6.16-rc?
>
> https://lore.kernel.org/linux-usb/20250626154009.GK2824380@black.fi.intel.com/
Yes, I was waiting for this last round to go to Linus as the pull
request was made against a newer version of Linus's tree than I
currently had in my "for linus" branch. I'll go get to that later
today.
thanks,
greg k-h
next prev parent reply other threads:[~2025-07-07 7:57 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-11 15:14 [PATCH] thunderbolt: Fix a logic error in wake on connect Mario Limonciello
2025-04-11 15:20 ` Greg KH
2025-04-16 12:37 ` Mika Westerberg
2025-04-16 13:27 ` Mario Limonciello
2025-04-16 16:23 ` Mika Westerberg
2025-06-29 17:52 ` [REGRESSION] " Alyssa Ross
2025-06-30 11:32 ` Alyssa Ross
2025-07-06 14:46 ` Mario Limonciello
2025-07-07 7:57 ` Greg Kroah-Hartman [this message]
2025-07-14 16:35 ` Mario Limonciello
2025-07-15 5:56 ` Greg Kroah-Hartman
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=2025070737-charbroil-imply-7b5e@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=YehezkelShB@gmail.com \
--cc=andreas.noever@gmail.com \
--cc=hi@alyssa.is \
--cc=kim.lindberger@gmail.com \
--cc=linux-usb@vger.kernel.org \
--cc=linux@lunaa.ch \
--cc=mario.limonciello@amd.com \
--cc=michael.jamet@intel.com \
--cc=mika.westerberg@linux.intel.com \
--cc=rajat.khandelwal@intel.com \
--cc=regressions@lists.linux.dev \
--cc=sashal@kernel.org \
--cc=stable@vger.kernel.org \
--cc=superm1@kernel.org \
--cc=westeri@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