All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb: typec: ucsi: Retry if notification enable timesout
@ 2026-07-29 18:21 Mark Pearson
  2026-08-05 12:03 ` Heikki Krogerus
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Pearson @ 2026-07-29 18:21 UTC (permalink / raw)
  To: mpearson-lenovo; +Cc: heikki.krogerus, gregkh, linux-usb, linux-kernel

Found on Thinkpad E14 G8.
When UCSI notifications are enabled the FW does not ack the enablement
itself. Future commands will be acked correctly.

If this happens try enablement again and confirm acks are working
correctly.

Signed-off-by: Mark Pearson <mpearson-lenovo@squebb.ca>
---
 drivers/usb/typec/ucsi/ucsi.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c
index 49f1c53721bb..ea25c44c2850 100644
--- a/drivers/usb/typec/ucsi/ucsi.c
+++ b/drivers/usb/typec/ucsi/ucsi.c
@@ -2082,6 +2082,12 @@ static int ucsi_init(struct ucsi *ucsi)
 	ntfy = UCSI_ENABLE_NTFY_CMD_COMPLETE | UCSI_ENABLE_NTFY_ERROR;
 	command = UCSI_SET_NOTIFICATION_ENABLE | ntfy;
 	ret = ucsi_send_command(ucsi, command, NULL, 0);
+	/*
+	 * Some FW may not ack the notification enable the first time.
+	 * If this happens, repeat to confirm it is actually working
+	 */
+	if (ret == -ETIMEDOUT)
+		ret = ucsi_send_command(ucsi, command, NULL, 0);
 	if (ret < 0)
 		goto err_reset;
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-08-05 12:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-29 18:21 [PATCH] usb: typec: ucsi: Retry if notification enable timesout Mark Pearson
2026-08-05 12:03 ` Heikki Krogerus

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.