vboot: clear recovery request in all boot modes

Previously, recovery requests are only cleared when user
initiates a manual recovery.  This causes problems with
two cases specifically:

  * Transient failures - The recovery request remains in the
    subcode field for some unknown period of time, and then
    erroneously gets promoted to the "recovery reason" the
    next time the user initiates a manual recovery request.

  * TRAIN_AND_REBOOT - The recovery request remains in the
    subcode field after training has completed.  The next
    time a manual recovery request is initiated, the subcode
    is promoted and training occurs yet again.  When finished,
    a reboot occurs and the user ends up back in the OS.

Make two changes to deal with these cases:

* Clear recovery request (including subcode) unconditionally
  for non-recovery boot modes.

* Stop promoting TRAIN_AND_REBOOT subcodes.

BUG=b:153157134, b:35576380
TEST=make clean && make runtests
BRANCH=none

Change-Id: I79f8fbed72a9d052b5ed5f70e9a2515136b6ef10
Signed-off-by: Joel Kitching <kitching@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2139335
Tested-by: Joel Kitching <kitching@chromium.org>
Tested-by: Frank Wu <frank_wu@compal.corp-partner.google.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Commit-Queue: Joel Kitching <kitching@chromium.org>
Signed-off-by: Frank Wu <frank_wu@compal.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/2148571
Reviewed-by: Joel Kitching <kitching@chromium.org>
3 files changed