Enabling tracing with:
echo 1 > /sys/kernel/debug/tracing/events/cros_ec/cros_ec_request_start/enable
To monitor the command and response size. The defaults are 194 and 128 respectively:
cros_ec_request_start: version: 0, offset: 0, command: EC_CMD_LIGHTBAR_CMD, outsize: 194, insize: 128
Reduce the sizes to the expected subcommands.
Signed-off-by: Gwendal Grignou <gwendal@google.com>
Link: https://lore.kernel.org/r/20260204035036.697955-1-gwendal@google.com
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
param = (struct ec_params_lightbar *)msg->data;
param->cmd = LIGHTBAR_CMD_SEQ;
param->seq.num = num;
+ msg->outsize = offsetof(typeof(*param), seq) + sizeof(param->seq);
+ msg->insize = 0;
ret = lb_throttle();
if (ret)
goto exit;
if (ret)
goto exit;
param = (struct ec_params_lightbar *)msg->data;
+ msg->insize = 0;
if (lb_version < 3) {
dev_info(dev, "Copying %zu byte program to EC", count);