Re: [stable 6.6.y] commit e613904fa419 causes suspend regression

From: Sergey Senozhatsky

Date: Tue May 19 2026 - 22:08:18 EST


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@xxxxxxxxxxx/

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.