Skip to content

Commit 7f95d2b

Browse files
author
Tzung-Bi Shih
committed
platform/chrome: cros_ec_proto: return -EAGAIN when retries timed out
While EC_COMMS_STATUS_PROCESSING flag is still on after it tries EC_COMMAND_RETRIES times for sending EC_CMD_GET_COMMS_STATUS, cros_ec_wait_until_complete() doesn't return an error code. Return -EAGAIN in the case instead. Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org> Reviewed-by: Guenter Roeck <groeck@chromium.org> Link: https://lore.kernel.org/r/20220718050914.2267370-9-tzungbi@kernel.org
1 parent 00eb36d commit 7f95d2b

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

drivers/platform/chrome/cros_ec_proto.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,9 @@ static int cros_ec_wait_until_complete(struct cros_ec_device *ec_dev, uint32_t *
167167
return ret;
168168
}
169169

170+
if (i >= EC_COMMAND_RETRIES)
171+
ret = -EAGAIN;
172+
170173
return ret;
171174
}
172175

0 commit comments

Comments
 (0)