Skip to content

Commit 02d210f

Browse files
jwrdegoedegregkh
authored andcommitted
usb: ucsi_acpi: Increase the command completion timeout
Commit 130a96d ("usb: typec: ucsi: acpi: Increase command completion timeout value") increased the timeout from 5 seconds to 60 seconds due to issues related to alternate mode discovery. After the alternate mode discovery switch to polled mode the timeout was reduced, but instead of being set back to 5 seconds it was reduced to 1 second. This is causing problems when using a Lenovo ThinkPad X1 yoga gen7 connected over Type-C to a LG 27UL850-W (charging DP over Type-C). When the monitor is already connected at boot the following error is logged: "PPM init failed (-110)", /sys/class/typec is empty and on unplugging the NULL pointer deref fixed earlier in this series happens. When the monitor is connected after boot the following error is logged instead: "GET_CONNECTOR_STATUS failed (-110)". Setting the timeout back to 5 seconds fixes both cases. Fixes: e080650 ("usb: typec: ucsi: acpi: Reduce the command completion timeout") Cc: [email protected] Reviewed-by: Heikki Krogerus <[email protected]> Signed-off-by: Hans de Goede <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 0482c34 commit 02d210f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/usb/typec/ucsi/ucsi_acpi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ static int ucsi_acpi_sync_write(struct ucsi *ucsi, unsigned int offset,
7878
if (ret)
7979
goto out_clear_bit;
8080

81-
if (!wait_for_completion_timeout(&ua->complete, HZ))
81+
if (!wait_for_completion_timeout(&ua->complete, 5 * HZ))
8282
ret = -ETIMEDOUT;
8383

8484
out_clear_bit:

0 commit comments

Comments
 (0)