[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240320073927.1641788-4-lk@c--e.de>
Date: Wed, 20 Mar 2024 08:39:24 +0100
From: "Christian A. Ehrhardt" <lk@...e.de>
To: linux-kernel@...r.kernel.org
Cc: "Christian A. Ehrhardt" <lk@...e.de>,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Prashant Malani <pmalani@...omium.org>,
Jameson Thies <jthies@...gle.com>,
Abhishek Pandit-Subedi <abhishekpandit@...omium.org>,
Neil Armstrong <neil.armstrong@...aro.org>,
Uwe Kleine-König <u.kleine-koenig@...gutronix.de>,
Samuel Čavoj <samuel@...oj.net>,
linux-usb@...r.kernel.org,
Kenneth Crudup <kenny@...ix.com>
Subject: [PATCH 3/5] 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@...e.de>
---
drivers/usb/typec/ucsi/ucsi.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/typec/ucsi/ucsi.c b/drivers/usb/typec/ucsi/ucsi.c
index dceeed207569..63f340dbd867 100644
--- a/drivers/usb/typec/ucsi/ucsi.c
+++ b/drivers/usb/typec/ucsi/ucsi.c
@@ -151,8 +151,12 @@ static int ucsi_exec_command(struct ucsi *ucsi, u64 cmd)
if (!(cci & UCSI_CCI_COMMAND_COMPLETE))
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;
+ }
if (cci & UCSI_CCI_ERROR) {
if (cmd == UCSI_GET_ERROR_STATUS)
--
2.40.1
Powered by blists - more mailing lists