kernel_optimize_test/drivers/platform/chrome
Guenter Roeck 875a17c3ad platform/chrome: Re-introduce cros_ec_cmd_xfer and use it for ioctls
[ Upstream commit 57b888ca2541785de2fcb90575b378921919b6c0 ]

Commit 413dda8f2c ("platform/chrome: cros_ec_chardev: Use
cros_ec_cmd_xfer_status helper") inadvertendly changed the userspace ABI.
Previously, cros_ec ioctls would only report errors if the EC communication
failed, and otherwise return success and the result of the EC
communication. An EC command execution failure was reported in the EC
response field. The above mentioned commit changed this behavior, and the
ioctl itself would fail. This breaks userspace commands trying to analyze
the EC command execution error since the actual EC command response is no
longer reported to userspace.

Fix the problem by re-introducing the cros_ec_cmd_xfer() helper, and use it
to handle ioctl messages.

Fixes: 413dda8f2c ("platform/chrome: cros_ec_chardev: Use cros_ec_cmd_xfer_status helper")
Cc: Daisuke Nojiri <dnojiri@chromium.org>
Cc: Rob Barnes <robbarnes@google.com>
Cc: Rajat Jain <rajatja@google.com>
Cc: Brian Norris <briannorris@chromium.org>
Cc: Parth Malkan <parthmalkan@google.com>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-09 10:21:14 +02:00
..
wilco_ec
chromeos_laptop.c
chromeos_pstore.c
chromeos_tbmc.c
cros_ec_chardev.c platform/chrome: Re-introduce cros_ec_cmd_xfer and use it for ioctls 2022-06-09 10:21:14 +02:00
cros_ec_debugfs.c platform/chrome: cros_ec_debugfs: detach log reader wq from devm 2022-05-25 09:17:54 +02:00
cros_ec_i2c.c
cros_ec_ishtp.c
cros_ec_lightbar.c
cros_ec_lpc_mec.c
cros_ec_lpc_mec.h
cros_ec_lpc.c
cros_ec_proto.c platform/chrome: Re-introduce cros_ec_cmd_xfer and use it for ioctls 2022-06-09 10:21:14 +02:00
cros_ec_rpmsg.c
cros_ec_sensorhub_ring.c platform: chrome: Split trace include file 2022-04-08 14:40:38 +02:00
cros_ec_sensorhub_trace.h platform: chrome: Split trace include file 2022-04-08 14:40:38 +02:00
cros_ec_sensorhub.c
cros_ec_spi.c
cros_ec_sysfs.c
cros_ec_trace.c
cros_ec_trace.h platform: chrome: Split trace include file 2022-04-08 14:40:38 +02:00
cros_ec_typec.c platform/chrome: cros_ec_typec: Check for EC device 2022-04-08 14:40:42 +02:00
cros_ec_vbc.c
cros_ec.c platform/chrome: cros_ec: fix error handling in cros_ec_register() 2022-06-09 10:21:14 +02:00
cros_ec.h
cros_kbd_led_backlight.c
cros_usbpd_logger.c
cros_usbpd_notify.c
Kconfig
Makefile platform: chrome: Split trace include file 2022-04-08 14:40:38 +02:00