mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-07-19 07:39:54 +02:00
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 <ammy.yi@intel.com>
Fixes: bdc62f2bae
("usb: typec: ucsi: Simplified registration and I/O API")
Cc: stable@vger.kernel.org
Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240531104653.1303519-1-heikki.krogerus@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
f85d39dd7e
commit
8bdf8a42bc
|
@ -153,8 +153,13 @@ static int ucsi_exec_command(struct ucsi *ucsi, u64 cmd)
|
|||
}
|
||||
|
||||
if (cci & UCSI_CCI_ERROR) {
|
||||
if (cmd == UCSI_GET_ERROR_STATUS)
|
||||
if (cmd == UCSI_GET_ERROR_STATUS) {
|
||||
ret = ucsi_acknowledge(ucsi, false);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return -EIO;
|
||||
}
|
||||
return ucsi_read_error(ucsi);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user