mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
usb: typec: ucsi: Ack unsupported commands
commit 6b5c85ddeea77d18c4b69e3bda60e9374a20c304 upstream. If a command completes the OPM must send an ack. This applies to unsupported commands, too. Send the required ACK for unsupported commands. Signed-off-by: Christian A. Ehrhardt <lk@c--e.de> Cc: stable <stable@kernel.org> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-QRD Link: https://lore.kernel.org/r/20240320073927.1641788-4-lk@c--e.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
959aacfe3a
commit
f8704d54c8
@@ -138,8 +138,12 @@ static int ucsi_exec_command(struct ucsi *ucsi, u64 cmd)
|
|||||||
if (!(cci & UCSI_CCI_COMMAND_COMPLETE))
|
if (!(cci & UCSI_CCI_COMMAND_COMPLETE))
|
||||||
return -EIO;
|
return -EIO;
|
||||||
|
|
||||||
if (cci & UCSI_CCI_NOT_SUPPORTED)
|
if (cci & UCSI_CCI_NOT_SUPPORTED) {
|
||||||
|
if (ucsi_acknowledge_command(ucsi) < 0)
|
||||||
|
dev_err(ucsi->dev,
|
||||||
|
"ACK of unsupported command failed\n");
|
||||||
return -EOPNOTSUPP;
|
return -EOPNOTSUPP;
|
||||||
|
}
|
||||||
|
|
||||||
if (cci & UCSI_CCI_ERROR) {
|
if (cci & UCSI_CCI_ERROR) {
|
||||||
if (cmd == UCSI_GET_ERROR_STATUS)
|
if (cmd == UCSI_GET_ERROR_STATUS)
|
||||||
|
|||||||
Reference in New Issue
Block a user