linux/drivers/usb/typec
Christian A. Ehrhardt 3aa71c7717 usb: ucsi_acpi: Fix command completion handling
commit 2840143e39 upstream.

In case of a spurious or otherwise delayed notification it is
possible that CCI still reports the previous completion. The
UCSI spec is aware of this and provides two completion bits in
CCI, one for normal commands and one for acks. As acks and commands
alternate the notification handler can determine if the completion
bit is from the current command.

The initial UCSI code correctly handled this but the distinction
between the two completion bits was lost with the introduction of
the new API.

To fix this revive the ACK_PENDING bit for ucsi_acpi and only complete
commands if the completion bit matches.

Fixes: f56de278e8 ("usb: typec: ucsi: acpi: Move to the new API")
Cc: stable@vger.kernel.org
Signed-off-by: "Christian A. Ehrhardt" <lk@c--e.de>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20240121204123.275441-3-lk@c--e.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2024-02-23 08:55:04 +01:00
..
altmodes usb: typec: altmodes/displayport: fix pin_assignment_show 2023-05-24 17:36:53 +01:00
mux usb: typec: intel_pmc_mux: Don't leak the ACPI device reference count 2023-03-10 09:39:37 +01:00
tcpm usb: typec: tcpm: Skip hard reset when in error recovery 2023-12-03 07:31:25 +01:00
tipd usb: typec: tipd: Fix spurious fwnode_handle_put in error path 2022-12-31 13:14:27 +01:00
ucsi usb: ucsi_acpi: Fix command completion handling 2024-02-23 08:55:04 +01:00
bus.c usb: typec: bus: verify partner exists in typec_altmode_attention 2023-09-19 12:22:53 +02:00
bus.h usb: typec: Organize the private headers properly 2021-04-05 09:07:41 +02:00
class.c usb: typec: class: fix typec_altmode_put_partner to put plugs 2024-01-25 14:52:47 -08:00
class.h usb: typec: Link all ports during connector registration 2021-04-09 16:00:00 +02:00
hd3ss3220.c usb: typec: hd3ss3220: Use OF graph API to get the connector fwnode 2020-10-02 15:28:18 +02:00
Kconfig usb: typec: STUSB160X should select REGMAP_I2C 2021-11-18 19:16:54 +01:00
Makefile usb: typec: Port mapping utility 2021-04-09 16:00:00 +02:00
mux.c usb: typec: mux: Check dev_set_name() return value 2022-06-14 18:36:05 +02:00
mux.h usb: typec: mux: Use device type instead of device name for matching 2021-05-27 09:23:57 +02:00
port-mapper.c usb: typec: silence a static checker warning 2021-04-14 15:15:40 +02:00
qcom-pmic-typec.c usb: typec: Add QCOM PMIC typec detection driver 2020-10-09 15:14:43 +02:00
stusb160x.c usb: typec: stusb160x: Don't block probing of consumer of "connector" nodes 2021-07-21 09:16:40 +02:00