diff options
author | Heikki Krogerus <heikki.krogerus@linux.intel.com> | 2021-09-20 17:24:14 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-10-05 13:42:37 +0300 |
commit | 47eb8de3bbde346b880bb65ef0abe907d7fd6438 (patch) | |
tree | 3c0200c023eb3c8f376f681fd77e0522157dcf63 /drivers/usb/typec | |
parent | 094902bc6a3c831262c12d0c2095af6a5eb62eef (diff) | |
download | linux-47eb8de3bbde346b880bb65ef0abe907d7fd6438.tar.xz |
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 <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20210920142419.54493-3-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/typec')
-rw-r--r-- | drivers/usb/typec/ucsi/ucsi.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c index ffb5be51daf8..a35efd8174bd 100644 --- a/drivers/usb/typec/ucsi/ucsi.c +++ b/drivers/usb/typec/ucsi/ucsi.c @@ -437,6 +437,8 @@ static int ucsi_register_altmodes(struct ucsi_connector *con, u8 recipient) command |= UCSI_GET_ALTMODE_CONNECTOR_NUMBER(con->num); command |= UCSI_GET_ALTMODE_OFFSET(i); len = ucsi_send_command(con->ucsi, command, alt, sizeof(alt)); + if (len == -EBUSY) + continue; if (len <= 0) return len; |