Skip to content

Commit 8bdf8a4

Browse files
Heikki Krogerusgregkh
authored andcommitted
usb: typec: ucsi: Ack also failed Get Error commands
It is possible that also the GET_ERROR command fails. If that happens, the command completion still needs to be acknowledged. Otherwise the interface will be stuck until it's reset. Reported-by: Ammy Yi <[email protected]> Fixes: bdc62f2 ("usb: typec: ucsi: Simplified registration and I/O API") Cc: [email protected] Signed-off-by: Heikki Krogerus <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent f85d39d commit 8bdf8a4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

drivers/usb/typec/ucsi/ucsi.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,13 @@ static int ucsi_exec_command(struct ucsi *ucsi, u64 cmd)
153153
}
154154

155155
if (cci & UCSI_CCI_ERROR) {
156-
if (cmd == UCSI_GET_ERROR_STATUS)
156+
if (cmd == UCSI_GET_ERROR_STATUS) {
157+
ret = ucsi_acknowledge(ucsi, false);
158+
if (ret)
159+
return ret;
160+
157161
return -EIO;
162+
}
158163
return ucsi_read_error(ucsi);
159164
}
160165

0 commit comments

Comments
 (0)