Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Commit 6b5c85d

Browse files
Christian A. Ehrhardtgregkh
authored andcommitted
usb: typec: ucsi: Ack unsupported commands
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>
1 parent 808a8b9 commit 6b5c85d

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/usb/typec/ucsi/ucsi.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,12 @@ static int ucsi_exec_command(struct ucsi *ucsi, u64 cmd)
151151
if (!(cci & UCSI_CCI_COMMAND_COMPLETE))
152152
return -EIO;
153153

154-
if (cci & UCSI_CCI_NOT_SUPPORTED)
154+
if (cci & UCSI_CCI_NOT_SUPPORTED) {
155+
if (ucsi_acknowledge_command(ucsi) < 0)
156+
dev_err(ucsi->dev,
157+
"ACK of unsupported command failed\n");
155158
return -EOPNOTSUPP;
159+
}
156160

157161
if (cci & UCSI_CCI_ERROR) {
158162
if (cmd == UCSI_GET_ERROR_STATUS)

0 commit comments

Comments
 (0)