diff options
| author | Rob Barnes <robbarnes@google.com> | 2026-08-31 18:51:26 -0600 |
|---|---|---|
| committer | Tzung-Bi Shih <tzungbi@kernel.org> | 2026-09-01 02:16:14 +0000 |
| commit | c55749415623a58eba3eb527da023d29b43fbf5d (patch) | |
| tree | fad76f35f00557c9fcbc4bebdb8ef994a78c79ce /scripts/Makefile.thinlto | |
| parent | b57af7f8d194617e965d9713a767cc012774a2b9 (diff) | |
| download | linux-next-c55749415623a58eba3eb527da023d29b43fbf5d.tar.gz linux-next-c55749415623a58eba3eb527da023d29b43fbf5d.zip | |
platform/chrome: cros_ec_proto: Fix deferred response
When cros_ec_wait_until_complete() succeeds after an
EC_RES_IN_PROGRESS status, it previously returned the 4-byte
transfer size of EC_CMD_GET_COMMS_STATUS. For 0-byte payload
commands (such as EC_CMD_FLASH_ERASE), userspace received 4
bytes instead of 0, causing response size validation errors.
For commands expecting non-zero response payloads, the kernel
exited without issuing EC_CMD_RESEND_RESPONSE, leaving response
buffers uninitialized.
Refactor cros_ec_wait_until_complete() to pass orig_msg, issue
EC_CMD_RESEND_RESPONSE into orig_msg->data when insize > 0, and
return 0 for 0-byte response commands.
Fixes: 2c7589af3c4d ("mfd: cros_ec: add proto v3 skeleton")
Signed-off-by: Rob Barnes <robbarnes@google.com>
Link: https://lore.kernel.org/r/20260901005126.3344929-1-robbarnes@google.com
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
