From: Sergey Senozhatsky <senozhatsky@chromium.org>
To: Myrrh Periwinkle <myrrhperiwinkle@qtmlabs.xyz>
Cc: Sergey Senozhatsky <senozhatsky@chromium.org>,
Heikki Krogerus <heikki.krogerus@linux.intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
stable@kernel.org, linux-usb@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [stable 6.6.y] commit e613904fa419 causes suspend regression
Date: Wed, 20 May 2026 11:08:02 +0900 [thread overview]
Message-ID: <ag0WeuD0iXY9hoJ9@google.com> (raw)
In-Reply-To: <1d13382f-9b0c-47bb-8939-36f0b03c4dca@qtmlabs.xyz>
Hi Myrrh,
On (26/05/19 19:01), Myrrh Periwinkle wrote:
> (re-sending as text/plain as the previous one got rejected by the mailing
> list)
>
> Hello,
>
> On 5/19/26 11:51 AM, Sergey Senozhatsky wrote:
> > Hi,
> >
> > We've identified 6.6.y stable commit e613904fa419 (usb: typec: ucsi:
> > Update power_supply on power role change) (commit 7616f006db07017 upstream)
> > as a root-cause of suspend failures on some of our laptops. It seems
> > that ucsi_port_psy_changed() causes:
> >
> > [ 309.858915] PM: last active wakeup source: ucsi-source-psy-cros_ec_ucsi.3.auto2
> > [ 309.858917] PM: PM: Last active Wakeup Source: ucsi-source-psy-cros_ec_ucsi.3.auto2
> >
> > which prevent laptop from entering suspend. Reverting the commit in
> > question fixes the issue.
>
> Can you check if this patch series fixes your issue? https://lore.kernel.org/all/20260519-ucsi-fix-2-v1-0-6f1239535187@qtmlabs.xyz/
Sure, thanks a ton for the patches! I backported them to 6.6.y
---
drivers/usb/typec/ucsi/ucsi.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c
index 2eeace0f2450f..27d92eff84b89 100644
--- a/drivers/usb/typec/ucsi/ucsi.c
+++ b/drivers/usb/typec/ucsi/ucsi.c
@@ -1224,12 +1224,14 @@ static void ucsi_handle_connector_change(struct work_struct *work)
struct ucsi_connector *con = container_of(work, struct ucsi_connector,
work);
struct ucsi *ucsi = con->ucsi;
- enum typec_role role;
+ enum typec_role role, prev_role;
u64 command;
int ret;
mutex_lock(&con->lock);
+ prev_role = !!(con->status.flags & UCSI_CONSTAT_PWR_DIR);
+
command = UCSI_GET_CONNECTOR_STATUS | UCSI_CONNECTOR_NUMBER(con->num);
ret = ucsi_send_command_common(ucsi, command, &con->status,
@@ -1248,7 +1250,7 @@ static void ucsi_handle_connector_change(struct work_struct *work)
role = !!(con->status.flags & UCSI_CONSTAT_PWR_DIR);
- if (con->status.change & UCSI_CONSTAT_POWER_DIR_CHANGE) {
+ if ((con->status.change & UCSI_CONSTAT_POWER_DIR_CHANGE) && role != prev_role) {
typec_set_pwr_role(con->port, role);
ucsi_port_psy_changed(con);
--
2.54.0.631.ge1b05301d1-goog
and
---
drivers/usb/typec/ucsi/ucsi.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c
index 27d92eff84b89..a2d2098925a7f 100644
--- a/drivers/usb/typec/ucsi/ucsi.c
+++ b/drivers/usb/typec/ucsi/ucsi.c
@@ -1252,7 +1252,12 @@ static void ucsi_handle_connector_change(struct work_struct *work)
if ((con->status.change & UCSI_CONSTAT_POWER_DIR_CHANGE) && role != prev_role) {
typec_set_pwr_role(con->port, role);
- ucsi_port_psy_changed(con);
+
+ /* Some power_supply properties vary depending on the power direction when
+ * connected
+ */
+ if (con->status.flags & UCSI_CONSTAT_CONNECTED)
+ ucsi_port_psy_changed(con);
/* Complete pending power role swap */
if (!completion_done(&con->complete))
--
2.54.0.631.ge1b05301d1-goog
I started the tests, need prob around a day or so to verify.
prev parent reply other threads:[~2026-05-20 2:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-19 4:51 [stable 6.6.y] commit e613904fa419 causes suspend regression Sergey Senozhatsky
2026-05-19 9:29 ` Greg Kroah-Hartman
2026-05-19 9:44 ` Sergey Senozhatsky
2026-05-19 9:51 ` Greg Kroah-Hartman
2026-05-19 12:01 ` Myrrh Periwinkle
2026-05-20 2:08 ` Sergey Senozhatsky [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=ag0WeuD0iXY9hoJ9@google.com \
--to=senozhatsky@chromium.org \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=myrrhperiwinkle@qtmlabs.xyz \
--cc=stable@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