Skip to content

Commit 47eb8de

Browse files
Heikki Krogerusgregkh
authored andcommitted
usb: typec: ucsi: Don't stop alt mode registration on busy condition
If the PPM says it's busy, we can now simply try again. Signed-off-by: Heikki Krogerus <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 094902b commit 47eb8de

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/usb/typec/ucsi/ucsi.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,8 @@ static int ucsi_register_altmodes(struct ucsi_connector *con, u8 recipient)
437437
command |= UCSI_GET_ALTMODE_CONNECTOR_NUMBER(con->num);
438438
command |= UCSI_GET_ALTMODE_OFFSET(i);
439439
len = ucsi_send_command(con->ucsi, command, alt, sizeof(alt));
440+
if (len == -EBUSY)
441+
continue;
440442
if (len <= 0)
441443
return len;
442444

0 commit comments

Comments
 (0)