• Jett Rink's avatar
    platform/chrome: cros_ec_ishtp: skip old cros_ec responses · 0f706b4f
    Jett Rink authored
    The ISHTP layer can give us old responses that we already gave up on. We
    do not want to interpret these old responses as the current response we
    are waiting for.
    
    The cros_ish should only have one request in flight at a time. We send
    the request and wait for the response from the ISH. If the ISH is too
    slow to respond we give up on that request and we can send a new
    request. The ISH may still send the response to the request that timed
    out and without this we treat the old response as the response to the
    current command. This is a condition that should not normally happen but
    it has been observed with a bad ISH image. So add a token to the request
    header which is copied into the response header when the ISH processes
    the message to ensure that response is for the current request.
    Signed-off-by: default avatarJett Rink <jettrink@chromium.org>
    Signed-off-by: default avatarMathew King <mathewk@chromium.org>
    Signed-off-by: default avatarEnric Balletbo i Serra <enric.balletbo@collabora.com>
    0f706b4f
cros_ec_ishtp.c 21.2 KB