diff --git a/patches.suse/usb-typec-ucsi-Ack-unsupported-commands.patch b/patches.suse/usb-typec-ucsi-Ack-unsupported-commands.patch new file mode 100644 index 0000000..f61a288 --- /dev/null +++ b/patches.suse/usb-typec-ucsi-Ack-unsupported-commands.patch @@ -0,0 +1,46 @@ +From 6b5c85ddeea77d18c4b69e3bda60e9374a20c304 Mon Sep 17 00:00:00 2001 +From: "Christian A. Ehrhardt" +Date: Wed, 20 Mar 2024 08:39:24 +0100 +Subject: [PATCH] usb: typec: ucsi: Ack unsupported commands +Git-commit: 6b5c85ddeea77d18c4b69e3bda60e9374a20c304 +Patch-mainline: v6.9-rc2 +References: stable-fixes + +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 +Cc: stable +Reviewed-by: Heikki Krogerus +Tested-by: Neil Armstrong # on SM8550-QRD +Link: https://lore.kernel.org/r/20240320073927.1641788-4-lk@c--e.de +Signed-off-by: Greg Kroah-Hartman +Acked-by: Takashi Iwai + +--- + 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.43.0 + diff --git a/series.conf b/series.conf index dff2162..6a54e56 100644 --- a/series.conf +++ b/series.conf @@ -46235,6 +46235,7 @@ patches.suse/usb-typec-Return-size-of-buffer-if-pd_set-operation-.patch patches.suse/usb-typec-ucsi-Clear-EVENT_PENDING-under-PPM-lock.patch patches.suse/usb-typec-ucsi-Check-for-notifications-after-init.patch + patches.suse/usb-typec-ucsi-Ack-unsupported-commands.patch patches.suse/scsi-lpfc-Correct-size-for-wqe-for-memset.patch patches.suse/scsi-lpfc-Correct-size-for-cmdwqe-rspwqe-for-memset.patch patches.suse/scsi-qla2xxx-Prevent-command-send-on-chip-reset.patch