Re: [PATCH v5 1/2] cros_ec_proto: Consolidate ec_response_get_next_event

From: Dmitry Torokhov
Date: Thu Jun 27 2024 - 19:58:49 EST


On Thu, Jun 27, 2024 at 04:53:07PM -0700, Daisuke Nojiri wrote:
> Consolidate struct ec_response_get_next_event_v*.
>
> Let X->Y indicate kernel X sending EC_CMD_GET_NEXT_EVENT to FW Y.
>
> Old->New:
> Existing kernels send a smaller container (e.g.
> ec_response_get_next_data) which may or may not fit the last few
> bytes. The FW copies as many bytes as possible to the container. The
> kernel processes as many leading bytes as it can understand.
>
> New->Old:
> New kernels send a bigger container. Existing FW copies as many bytes
> as it wants, leaving the last few bytes empty. The kernel knows it
> didn't receive full size data from the returned data length.
>
> Signed-off-by: Daisuke Nojiri <dnojiri@xxxxxxxxxxxx>

Reviewed-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx>

Thanks.

--
Dmitry